How can we help you today? How can we help you today?

Azure database, Default Connection String, Shadow Database

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?
IbexMark
0

Comments

6 comments

  • Sergio R
    Please see the instructions on the section labelled Changing the Shadow Database Connection on the following document for instructions on how to do this:
    https://documentation.red-gate.com/sca3/developing-databases-using-sql-change-automation/validating-change-scripts/target-and-shadow-databases
    Sergio R
    0
  • IbexMark
    No.  I recently posted another question where I wanted the connection string for new users of the project to point to the correct database.  If it did not, it would create a bit of a mess as they would point to the shadow database by default.  See " Where does SQL Change Automation store the connection string to the development database".  

    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.
    IbexMark
    0
  • IbexMark
    Please note that clearing the default database will always cause an error.   

    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.
    IbexMark
    0
  • way0utwest
    You all your developers using the same Azure SQL Database? Just curious.

    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.
    way0utwest
    0
  • brookal
    Can you use an Azure SQL database as a shadow database as I don't understand how to configure it.  I can't use the localDB option as I think I use a text catalog in my database which is not supported by SQLlocalDB.

    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.
    brookal
    0
  • way0utwest
    You should be able to. I haven't tried it, but the steps for configuring the shadow are here: https://documentation.red-gate.com/sca3/developing-databases-using-sql-change-automation/validating-change-scripts/target-and-shadow-databases

    way0utwest
    0

Add comment

Please sign in to leave a comment.