Batch linking of databases

Hello,

I have a multi-database project where each database must be re-linked to a different location in my SVN repo for qa or development of different branches. I would like to script out the linking of each of the 9 databases so that my devs and qa techs don't have to manually re-link each one to the new location when they are changing versions, and so that the risk of leaving one unchanged is mitigated.

Question 1: Does anyone know if it is possible to link a database to a repository in this automated fashion without using the SSMS add-in?
Question 2: If not, Is there any way to at least query the data of which databases are linked to which repositories, so I can check to see if all 9 of the databases have been consistently re-linked?

Thanks,
Jake

Comments

  • Anu DAnu D Posts: 876 Silver 3
    Hi Jake,

    Thanks for your post.

    To answers your questions:

    1. Unfortunately there is no way you can automate the linking process.

    2. You cannot query the database as well but there is a xml file which have all the linking information in one place for all the databases added in SQL Source control. The file is called LinkedDatabases.xml by default it is in this path: C:Users<Username>AppDataLocalRed GateSQL Source Control 4.

    Please let me know if this helps.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • Thanks Anu. Is there any place I can put in a feature request for automated linking?
  • Anu DAnu D Posts: 876 Silver 3
    Hi Jake,

    Yes you can post this feature on our USERVOICE website here.

    Other users can vote for it as well if they like the idea.

    Hope this helps.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
Sign In or Register to comment.