Is there any automated way to relink databases?

jbaggaley2jbaggaley2 Posts: 3
edited March 27, 2017 7:30AM in SQL Source Control
I noticed a post from several years ago about this (200+ points assigned) and was wondering if anything had been done on it yet?

We have a local db configuration & a large legacy application with 6 associated databases which we are in the process of trying to rewrite but will be stuck with for several years yet (before anyone comments about poor design #painOfInheritedLegacySystems).

Whilst we now have CI and are in the process of moving to CD with your fab tools a massive pain point is setting up the databases when branching.

We can automate setting up our application with all it's services into local IIS using powershell each time we have to branch including changing the configs and db names.

We have a script that generates the empty databases, sets up security, specific seed data and aliases.

What we can't do is the really important part of automating linking each database to the new branch and getting the latest structure/data. It has to be done manually which makes it painful to branch. :cry:

Another pain point is working out which db the link points to which is currently almost impossible. Please can you add some sort of property that just shows which branch the db is linked to (we are using VSO) or just put it in the GetLatest tab.

Have I missed something about how to do this or are there any plans to implement these?

thanks

Jon

Comments

  • Hi Jon,

    Although there isn't a native way to relink databases, you might want to look at Alessandro Alpi's blog post on this subject as he's written his own Powershell script to do the job. We can't support this as it's not our code, but if this is a major pain point for you then you might want to consider it. Here's the link - https://suxstellino.wordpress.com/2016/ ... e-control/

    As for the other suggestion, I don't think that's currently being looked at but I'd recommend that you post these suggestions on our UseVoice site. There you can make suggestions and vote on suggestions that other users have made.

    Thanks!
    Software Engineer
    Redgate Software
  • Thank you - I have added points to other people who have already come across this pain as well as posting the link you gave below to Colin Smiths request from 2010...
Sign In or Register to comment.