1. Home
  2. Technology
  3. Microsoft SQL Server
  4. Migrating MSSQL DB Using Stored Procedures (Windows to Windows)

Migrating MSSQL DB Using Stored Procedures (Windows to Windows)

PREPARE SOURCE MSSQL SERVER:

Step 1) Login to source server via RDP or Console

Step 2) Launch MSSQL Management Studio

Step 3) Connect to the instance of the SQL Server Database Engine and then expand the instance.

Step 4) Expand Databases, and select the name of the user database you want to detach.

Step 5) Right-Click the database name, point to Tasks, and then click Detach.  The Detach Databasedialog box appears.

Step 6) After the database is detached copy the .mdf, .ndf, and .ldf files that are associated with the database to the destination server.

PREPARE DESTINATION MSSQL SERVER:

Step 7) Login to source server via RDP or Console

Step 8) Launch MSSQL Management Studio

Step 9) Connect to the instance of the SQL Server Database Engine and then expand the instance.

Step 10) Right-click Databases, and click Attach.

Step 11) In the Attach Databases dialog box, to specify the database to be attached, click Add > In the Locate Database Files dialog box select the disk drive where the database resides and expand the directory tree to find and select the .mdf file of the database.

Updated on March 30, 2020

Related Articles