Lots of static data to link

anna.panna.p Posts: 34 New member
Hello,

I have between 50 and 100 tables containing static data (I know...it's a lot) that I need to version in SQL Source Control. The trouble is, those tables exist in about 40 databases across our servers. I would like to avoid manually selecting so many tables so many times through the GUI.

Is there a back door way to accomplish this? Maybe on the file system using SVN and/or modifying Red Gate SSC files? I have a developer here who's quite good at programmatically manipulating files, so we can work with just a little hint...

Thanks!
-Anna

Comments

  • Good question. As far as I'm aware, the 'link' in the GUI simply creates a file in the Data subfolder in the scripts folder with the table's name, so you could try automating the creation of these.

    David Atkinson
    Red Gate
    David Atkinson
    Product Manager
    Redgate Software
  • anna.panna.p Posts: 34 New member
    Hello,

    I'd tried this before without success.
    I finally had a chance to try it again and still no success.

    Here's what I did:
      * Create TestTable in DatabaseA * Commit DatabaseA..TestTable (to RepositoryA) * Insert record into DatabaseA..TestTable * Link static data on DatabaseA..TestTable * Commit DatabaseA..TestTable data link (to RepositoryA) * Create TestTable in DatabaseB * Commit DatabaseB..TestTable (to RepositoryB) * SVN check out RepositoryA to local drive * SVN check out RepositoryB to local drive * Manually copy RepositoryA > trunk > Data > dbo.TestTable_Data.sql to RepositoryB > trunk > Data * SVN commit changes to RepositoryB * Return to SSMS and refresh Commit Changes tab for DatabaseB * Nothing showed up
    Did I miss a step? Or do you have any other ideas?

    Thanks!
  • Hi,

    I'm not sure this will work unfortunately. As well as the files in the Data subfolder, I believe a couple of other changes are also made:

    - the RedGateDatabaseInfo.xml file (in the database folder) will have some details added about the tables that have data linked
    - the TableDataConfigs.xml" in "c:\users\<username>\appdata\local\red gate\sql source control 3" also seems to hold details of which databases/tables are used for source controlling data.

    I can't think of an easy way to update all these files as well (at least not simply enough that it'll be easier than just linking all the data in the correct way in the first place)
    Systems Software Engineer

    Redgate Software

  • anna.panna.p Posts: 34 New member
    Thanks for the reply,

    Is it possible to figure out a workaround/patch with you guys? We have a good number of seats.
  • James BJames B Posts: 1,124 Silver 4
    I don't have any immediate thoughts of how it could be automated to update the relevant file; but i'll have a talk with the development team to get their thoughts.
    Systems Software Engineer

    Redgate Software

  • anna.panna.p Posts: 34 New member
    Thank you!
Sign In or Register to comment.