locked
How to copy database to another domain??? RRS feed

  • Question

  • Hi,

             We are creating Sql 2008 R2 preproduction environment with different domain. Now we need to copy production database to preproduction environment. How should we copy database?

    Thanks,

    bp

    Wednesday, January 12, 2011 8:31 PM

Answers

  • The quickest and easiest way is to copy the data and log files to the new server and attach them:

    http://msdn.microsoft.com/en-us/library/ms187858.aspx

    Or you can back up the database and then restore it to the new instance, this does not require you to detach and take off line the database you are copying.

    Once the database is moved then the database users in the new instance will most likely not match to the instance logins from the old instance.  Since this is a different domain you will probably not want the previous domain logins as they might not be available, unless there is a trust between domains.  You can transfer logins, both SQL and domain, using the SSIS Transfer Logins control flow task:

    http://technet.microsoft.com/en-us/library/ms137870.aspx

    Hope this helps.


    David Dye http://sqlsafety.blogspot.com/
    • Proposed as answer by Ekrem Önsoy Wednesday, January 12, 2011 10:13 PM
    • Marked as answer by Kalman TothEditor Thursday, January 20, 2011 5:59 AM
    Wednesday, January 12, 2011 8:44 PM