0% found this document useful (0 votes)
37 views3 pages

Step by Step Migrate MDF & LDF

The document outlines a 7-step process to migrate SQL database files (MDF and LDF) to a new location: 1) connect to the SQL Server instance, 2) select the database, 3) detach the database, 4) move the MDF and LDF files to the new location, 5) attach the database by selecting the MDF file from the new location, 6) detach and attach additional databases by repeating steps 2-5, 7) the process is complete.

Uploaded by

Muhammad Zikri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views3 pages

Step by Step Migrate MDF & LDF

The document outlines a 7-step process to migrate SQL database files (MDF and LDF) to a new location: 1) connect to the SQL Server instance, 2) select the database, 3) detach the database, 4) move the MDF and LDF files to the new location, 5) attach the database by selecting the MDF file from the new location, 6) detach and attach additional databases by repeating steps 2-5, 7) the process is complete.

Uploaded by

Muhammad Zikri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Step by step migrate MDF [data] & LDF [log] SQL Databases

Planned Relocation Procedure


To move a data or log file as part of a planned relocation, follow these steps:

1. In SQL Server Management Studio Object Explorer, connect to the instance of the SQL Server
Database Engine.

2. Expand Databases, and select the name of the user database you want to detach.
3. Right-click the database name, point to Tasks, and then click Detach.

4. The Detach Database dialog box appears. Drop Connections and OK.
5. Moving database files to another location. In case, move mdf & ldf to drive
D:\backup26122018\DATA

6. After that, attach a database.


 In SQL Server Management Studio Object Explorer, connect to an instance of the SQL
Server Database Engine.
 Right-click Databases and click Attach.
 In the Attach Databases dialog box, to specify the database to be attached, click Add;
and 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.

7. For Detach & Attach to other databases, do the same as above.

You might also like