MS SQL Server Clone DB - Part2

Hi Everyone. 

Here is the  part 2 of MS SQL DB clone articles. 


MS SQL Server Clone DB - Part1

MS SQL Server Clone DB - Part2  (this article).


Copy the Backup file to Target QA Server using \\servername.qadomain.com\

On the target side, Take the Users and Roles Backup so that we can put back after database refresh completes. 

       Script out logins  Before restore database ..

2.      Right click on database (latitude)->tasks->generate scripts->


      Select  Users and Datbase Roles to script out. 



Before Restore check if any existing DB connections, kill if necessary. (SP_WHO to find all sessions)




On General Section - follow screen short - Select the backup file. 



Choose the 'Overwrite the existing database' option 
Restore with Recovery Option. 


Then you can import the Users and Roles Script that you have scripted out. 

Finally Map the users to engine user. 

Easily you can script out the backup and restore procedures. You can consistently repeat easily without GUI as well. 


Well done. !! 



No comments: