Azure database, Default Connection String, Shadow Database
IbexMark
Posts: 9 New member
My development database is an Azure database. I need to make sure that all developers use that database so I have set that as the default connection string. When the project attempts to utilize a shadow database it cannot as it is not allowed to create the shadow database on Azure.
How do I utilize the default connection string but still have the shadow database on my local machine?
How do I utilize the default connection string but still have the shadow database on my local machine?
Tagged:
Answers
https://documentation.red-gate.com/sca3/developing-databases-using-sql-change-automation/validating-change-scripts/target-and-shadow-databases
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
I have followed the recommendations of that post and changed the default database to point to the Azure development database. That solves the problem of a new developer pulling the project for the first time; he sees the Azure development database. Now, unfortunately, I cannot verify the project as the shadow database cannot reside on the Azure server. I would want it to be on the developer's own machine.
It looks like you have two places for the connection string to do the job of three things.
To fix the issue described above, you must first set your target database manually to point to the localDB, Set as Default, and then change your target DB manually back to Azure.
In terms of fixing the same project, yes, set a local source (Local SQL instance, Express, or LocalDB) and then make that the default. Then you can change the main connection. We are doing some work here that I hope will make this easier to change independently.
I apologise for all the questions but I can frantically trying to get our build pipeline working again so that I can generate a release.