How can we improve SQL Source Control?

initial setup automation

We've got HUNDREDS of databases. Dozens in active development.
Several obvious details are missing from the initial setup of a linked database. These are specific to VSS, but I'm sure apply to other SSC versions:
1) Remember the last used (VSS) Database path.
2) Remember the last Source Control Folder, BUT... SUGGEST the name of the new DB as the terminal project name.
3) Add a Check box to "Auto Commit" ALL objects.

The amount of retyping (or even copy/paste/edit) the same information over and over is quite annoying.

93 votes
Sign in
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Dwaine WrightDwaine Wright shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    Barry HBarry H shared a merged idea: automation of database linking  ·   · 
    Pete LPete L shared a merged idea: share database link configuration with other users  ·   · 
    under review  ·  Michael ChristofidesMichael Christofides responded  · 

    I wanted to update this as some recent testing has shown we broke the workaround for this a while ago. We are however scoping out what it’d look like to solve this properly. We have many of your contact details, so will be reaching out to a few of you for help, but if you’re super keen to get involved feel free to post above or email me and we’ll get you involved.


    Sign in
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      • SamSam commented  ·   ·  Flag as inappropriate

        We continue to randomly get errors with database linkage issues. It would be nice if we could get a resolution to this soon as we have hundreds of databases that we have to re-link to source control.

      • Brett CanterBrett Canter commented  ·   ·  Flag as inappropriate

        I agree with the comment that a command line enhancement would be an excellent fix. We currently use SQL Compare to generate reports on changes but we automate this reporting using the sqlcompare executable. Something similar for source control would be invaluable

      • Justin birdJustin bird commented  ·   ·  Flag as inappropriate

        As a first step, if extended properties exist but MY copy of SSMS isn't linked, couldn't SourceControl just say "you're not set up, do you want to add this link"?

        My entire team have had new machines built recently, we've had to re-connect every database :|

      • SamSam commented  ·   ·  Flag as inappropriate

        Honestly, I don't like the extended properties approach and would rather just see you guys create a Red Gate database that all team members could link up to.

      • SergeSerge commented  ·   ·  Flag as inappropriate

        3rd attempting to post this comment...
        I've tried the steps below and the users get the linked databases, however they get a "grey" dot on them. When clicking on it they aren't prompted to get a local copy and say "yes", rather they receive an application error:

        There is no working folder mapping for C:\Documents and Settings\sahar\Local Settings\Application Data\Red Gate\SQL Source Control 3\WorkingBases\y40aughq.j5u.

        Which they continue to get each time they click elsewhere in SSMS

      • SergeSerge commented  ·   ·  Flag as inappropriate

        I tried this route and it appeared to work but the users got a "grey" dot on the green linked database. There was no prompt for them to say "yes" to, rather it generated a SQL Source Control application error:
        "There is no working folder mapping for C:\Documents and Settings\<user>\Local Settings\Application Data\Red Gate\SQL Source Control 3\WorkingBases\y40aughq.j5u."
        (which they continue to receive while working in SSMS)

      • SergeSerge commented  ·   ·  Flag as inappropriate

        The admin's last post was in April of 2012...It took me hours to set up and link all of the databases from 20 servers to SSC - I can't have 9 other developers doing the same thing. Surely there has to be a solid way of automatically having these developers linked to source control??? Not only do you need to give them the XML file, but you need to create one for each ensure they have the proper root path Ex: C:\Documents and Settings\doej\Local Settings\Application Data\Red Gate\SQL Source Control 3\Transients\xxx.ddz

        I'm on the latest Beta...and from what I can tell there's no GUI options for SSC - does any one know if it's been added?

      • TMTM commented  ·   ·  Flag as inappropriate

        It seems to me there should be a configuration option available to the users to allow RedGate to store the configuration of databases to a specific "RedGateSourceSafeConfigurationDb" database. That way, we could manipulate that table easily to tell RedGate what the linkages are, and RedGate could write to the same table to store the information for new databases/developers.

      • Anonymous commented  ·   ·  Flag as inappropriate

        The work around helped a lot. Teaches me to save off that XML file the next time I have to wipe my Windows installation.
        But I think you are over thinking the answer a little bit. How about if at the Databases level, you had a link all with a browse to the root and then for each database it found, if there was a corresponding directory, just do the link? Then piecemeal in the missing ones.

      • Chris SmithAdminChris Smith (Project Manager - SQL Lighthouse, Red Gate) commented  ·   ·  Flag as inappropriate

        Following changes made in SQL Source Control version, you can now pass around a config file to help get additional users linked to nemerous databases more quickly. This release is currently available via the Check For Updates option from the application's Help menu.

        Disclaimer: This is clearly not a proper solution for this suggestion (we are planning to work on that in a future version of the product), but it might help you get other users set-up with fewer manual steps!

        So, here it goes:

        1. Setup SQL Source Control on one machine with all the linked databases that are required. Then copy the following file from that machine:
        C:\Users\[username]\AppData\Local\Red Gate\SQL Source Control 3\LinkedDatabases.xml

        2. This file should be placed into the same location (C:\Users\[username]\AppData\Local\Red Gate\SQL Source Control 3) on other machines where you would like these databases to be linked ([username] in this path should be the user who will be using the copied configuration on this machine).

        3. So, when the new user connects with SSMS to the server where the linked databases reside, they should see green database nodes in the object explorer indicating databases linked to source control. However, when one of these nodes is selected, because SQL Source Control has not got a local working copy of the database schema, it will prompt the user with the following question and they should reply YES to this:
        "There are no local files fore the database [database name]. Would you like to link it to source control?"

        4. SQL Source Control will then create the local files it needs to work with the database and the user should be up & running.

        It is worth noting that at the moment this does not work with Migration Folder locations (they cannot be copied in the above way).


      • Aaron JensenAaron Jensen commented  ·   ·  Flag as inappropriate

        We have 19 databases, and dozens of developers. I would like to write a PowerShell script that sets these extended properties so developers can open up SSMS and start working.

      • Todd NelsonTodd Nelson commented  ·   ·  Flag as inappropriate

        Yeah... us too. Many databases. Need to get them all in there. Would like to add the whole server and have the hierarchy Server.Database all get added to TFS.

      • David AtkinsonAdminDavid Atkinson (Admin, Red Gate) commented  ·   ·  Flag as inappropriate

        We hope to achieve this by storing a database-level extended property with the repository location. This means that linking a database won't require typing in the URL and folder details. I'm not sure this will make the next version, but hopefully not too much longer after.

      • David AtkinsonAdminDavid Atkinson (Admin, Red Gate) commented  ·   ·  Flag as inappropriate

        We acknowledge that the one-off set-up is tedious when multiplied by the number of developers. In the next version we'll be starting to store metadata such as version and repository information in database level extended properties. This will allow us in future to auto-link databases once the extended property is detected. This won't make the very next release, but should follow shortly afterwards.

      • kkamkkam commented  ·   ·  Flag as inappropriate

        We also have a large number of databases. We also develop in a team environment with multiple database developers. The time it takes to set up source control on our two servers for one person is bad enough.

        Since we can't simply export a "config" file of some sort to then send to the other database developers that means each of my team have to waste that same amount of time setting up their workstation. I can't afford that amount of down time.

        Although I am really interested in this source control plug-in, I likely won't purchase until there is some way to automate the setup for subsequent developers.

      Feedback and Knowledge Base