Introduction
In most of the forums I’m seeing a thread how to move databases from one server to another server. Seeing those things I’ve written this article to simple the task. Here in this article I’m going to provide you some steps to move all the databases (including system db) from one server to another server (hope no error should happen).
Steps to Move the database
Step1: Before detaching the db you need to script default database for all the logins, because if the user db is default db for logins then after detaching the db the login will point NULL and hence when the user logs in he will be in trouble. You can use the script “Script Default Database” to script all the default databases for the logins. Execute the script and save the output.
Step2: Once the above step completed you can detach all the user databases except system db’s (master, msdb, tempdb & model) in the source server. You can use the script “Detach User Databases” to detach all the user databases in the source server.
Step3: Stop SQL Service in the source server and copy all physical files (mdf, ldf & ndf) of the dbs to the destination server
Step4: Once the above step completed successfully, you need to first attach the system databases databases from the new path (i.e the path where you have copied the physical files). You can make use the articles “Moving System Databases - SQL Server 2005” or “Moving system databases — SQL Server 2000” to attach the system databases from new path.
NOTE: For moving system dbs you need to have same SQL edition, version and build in both source and destination servers. If you are not planning to move system db’s just skip this step.
Step5: Attach all the databases in the destination server from the new path.
Step6: Once the above steps completed successfully, start sql services, check errorlog for any errors.
Step7: Once you find everything perfect execute the script (saved in step1) to map all the logins back to its default databases and start using the applications with the respective FIDs.
Discussion
All your healthy discussion in this topic are most welcomed @ FORUMS section.
VN:F [1.0.8_357]
Rating: 0.0/5 (0 votes cast)
General
Administration, SQL Server