How to set the Shadow database connection

priyasinhapriyasinha Posts: 548 Silver 1
edited August 12, 2016 5:03AM in ReadyRoll
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.
Priya Sinha
Project Manager
Red Gate Software

Comments

  • Unfortunately there isn’t currently a way to do this through the ReadyRoll user interface (although this will change in ReadyRoll 1.7, out later this month), however the Shadow database server can be specified via a project property.

    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.
    Priya Sinha
    Project Manager
    Red Gate Software
  • allmhuranallmhuran Posts: 19 Bronze 2
    priyasinha wrote:
    Unfortunately there isn’t currently a way to do this through the ReadyRoll user interface (although this will change in ReadyRoll 1.7, out later this month),

    Is this now available in the UI? I can't seem to find it.
  • You can specify a different Shadow database by performing the following steps:

    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).
    Daniel Nolan
    Product Manager
    Redgate Software
  • allmhuranallmhuran Posts: 19 Bronze 2
    Got it, cheers!
  • There is now a way to set a specific connection string for the shadow database within the ReadyRoll project designer.

    Please see the following article within the documentation for more information:
    https://documentation.red-gate.com/display/RR1/Target+and+shadow+databases
    Daniel Nolan
    Product Manager
    Redgate Software
Sign In or Register to comment.