Creating a replica of existing SQL Server

  • Hi,

    I want to create a replica of our current OLTP data environment on a completely seperate server for testing purposes.  I am going to restore the user database to the new server and am considering restoring master as well -- however the data path's (for mdf's and ldf's) are not the same on the test server (our live environment is clustered and I cannot setup the test server in the same way).  Does anyone have any advice or gotcha's for restoring master db in a setup like I described for my test server?  Would I restore the user db's first and then master?  Any helps/suggestions is appreciated.  Thanks. 

  • You can do something like this.

    Create the same physical file structure on the new server. (You may have to create new partitions to create the same file structure as in production)

    install the SQL server on the test server on the same Drive as in Production.(Same Service pack as well)

    Shutdown the Test SQL server

    Note down the data/log file paths of all user and system databases on the Prod Server

    Shutdown the Prod SQL Server (Hope it's possible to find a time for this)

    Copy the data and log files from Prod Server to the Test server (exactly same location as production)

    Start the Prod Server

    Start the Test Server. You should see all the databases properly attached.

    If you want to change the location of User Databases now you can do it as you want and free up your additional partitions and may be remove your additional disks you used to create new partitions.

    There may be better ways of doing this. But this should also work.

  • Thanks for the reply Bimal.  I read an article similar to what you mentioned, again it stressed the need for the same file structure. 

    I was hoping there is a way around duplicating the same file struct.  I have changed the paths of user db's without any problems during  reconnects in the past - but master is a different story.

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

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