How to set the Shadow database connection
priyasinha
Redgate › Posts: 548 Silver 1
Note: This issues has been migrated from ReadyRoll support forum
Hi, I'm currently evaluating ReadyRoll for use within our company and I have a question regarding the shadow database. Our databases typically already exist as they are created by a data team so I'll be using the process of connecting to that existing database and importing it into the project. When I connect my Target db to that database instance however, it changes my Shadow database to also be stored on that same server. In this case the server is a shared server that usually has space issues and it's going to work if all our or devs end up creating shadow databases for each project they work on within that shared server.
Is it possible to have the Target point to a shared server, but have the Shadow continue to use LocalDB? I couldn't find a specific option for that so wanted to see if it was possible.
Hi, I'm currently evaluating ReadyRoll for use within our company and I have a question regarding the shadow database. Our databases typically already exist as they are created by a data team so I'll be using the process of connecting to that existing database and importing it into the project. When I connect my Target db to that database instance however, it changes my Shadow database to also be stored on that same server. In this case the server is a shared server that usually has space issues and it's going to work if all our or devs end up creating shadow databases for each project they work on within that shared server.
Is it possible to have the Target point to a shared server, but have the Shadow continue to use LocalDB? I couldn't find a specific option for that so wanted to see if it was possible.
Priya Sinha
Project Manager
Red Gate Software
Project Manager
Red Gate Software
Comments
To do so, open your sqlproj file for editing and add the following below the root node:
<PropertyGroup> <ShadowServer>(localdb)Projects</ShadowServer> </PropertyGroup>
Please note that using a LocalDb connection for the Shadow server may result in Visual Studio shutting down the instance after a certain period of inactivity. You can bring the instance back online by running the following command from a Developer Command Prompt window:
SqlLocalDb start Projects
Alternately, using a local instance of SQL Server Express or Developer Edition will avoid this issue.
Project Manager
Red Gate Software
Is this now available in the UI? I can't seem to find it.
1. Open your project in Visual Studio
2. Right-click the project in the Solution Explorer and select Properties.
3. Switch to the Debug tab.
4. On the Debug tab, check "Always use default connection string for Shadow database" (the very last option on the tab)
5. Close and re-open the project.
This should cause the Shadow database to be deployed to the "(localdb)ProjectsV13" instance. If you'd prefer to use a different instance for your Shadow database, change the connection string and then click "Set As Default" (also on the Debug tab).
Product Manager
Redgate Software
Please see the following article within the documentation for more information:
https://documentation.red-gate.com/display/RR1/Target+and+shadow+databases
Product Manager
Redgate Software