Deploying copies of an existing database to the same server

  • 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.

  • Can't you just take a back-up of the database and restore it under a different name?

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • 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.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply