Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Deploying copies of an existing database to the same server Expand / Collapse
Posted Thursday, January 9, 2014 7:42 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, May 5, 2014 6:27 AM
Points: 4, Visits: 24
Hello. I am trying to understand what is the best way to deploy a brand new database with the exact same schema as an existing DB on the same server, but with a different name. I want to preserve the data in all reference tables which I can do by having the relevant post-deployment scripts run after the deployment.
What I can't understand is how the project should be set up to deploy database Customer_2 if database Customer_1 exists on this server - the Visual Studio project contains DB Customer and I need to find a way to be able to deploy Customer_N (but without creating N identical DB's in the project). I checked a ton of articles and blogs, and feel dumb asking this question but haven't been able to understand it yet. Any help would be appreciated.
Post #1529628
Posted Friday, January 10, 2014 12:11 AM



Group: General Forum Members
Last Login: Thursday, September 22, 2016 2:39 AM
Points: 15,371, Visits: 13,116
Can't you just take a back-up of the database and restore it under a different name?

How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at SQLKover.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1529648
Posted Monday, January 13, 2014 2:46 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, September 13, 2016 3:21 AM
Points: 97, Visits: 914
What exactly are you using to do this deployment? Is it SSDT with a Database Project?

As has already been suggested, unless you are planning to set up some automated set up for it down the line, maybe doing a backup and restore, as has been suggested might be easier.
Post #1530215
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse