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

How does "Always use default connection string for Shadow database" work?

I want to ensure that my shadow database does NOT get created on target servers (esp QA and above).  I see the "Always use default connection for Shadow database" and the ability to set the default connection string in the Debug tab of the project properties.  Help me understand how to effectively use these two settings. How do I set the default connection string to a DB (e.g. <DBName>_Shadow) that may or may not exist?  I can't manually edit the connection string - have to point to an existing DB. Do you recommend creating an empty shadow DB, pointing to it and setting it to be the default?
PeterDaniels
0

Comments

3 comments

  • Pete_Ruiz
    Hello Peter,


    The important part here is that the "Target" is the development database, not what you are deploying to - so if your target is always on your local dev box, and you never point the Debug Target Connection String at another server, then it will only ever create the xx_shadow on the dev machine.

    Please let me know if this is helpful or if you have any more questions.

    Kind regards,

    Pete Ruiz
    Pete_Ruiz
    0
  • PeterDaniels
    If we have "Always use default connection for shadow" set in the project settings, shouldn't it always use that server/DB even if we connect in VS to another target?

    Also, I do sometimes use the VS IDE and connection to deploy the project - esp when we don't have CI set up yet.
    PeterDaniels
    0
  • PeterDaniels
    Since I have enterprise edition functionality in some of my migrations (e.g. Create index with online = on), I have to use a shadow db on my dev edition local SQL server instance. So I checked "always use default db for shadow" and set the default connection strong to point to "<projectName>_shadow"
    PeterDaniels
    0

Add comment

Please sign in to leave a comment.