Microsoft KB Archive/181602

= INF: How to Move a Device to Another Location =

Article ID: 181602

Article Last Modified on 11/5/2003

-

APPLIES TO


 * Microsoft SQL Server 6.0 Standard Edition
 * Microsoft SQL Server 6.5 Standard Edition

-



This article was previously published under Q181602



SUMMARY
This article describes how to move a device to another location in SQL Server versions 6.0 and 6.5. To do this in SQL Server version 7.0, search for "Attaching and Detaching Databases" in SQL Server Books Online.



MORE INFORMATION
To move a device to another location, perform the steps in either one of the following options. CAUTION: Before attempting this operation, ensure that you have a current backup of the user database and master database.

Option 1
You can use the following steps to move a user device. To move the master device (master.dat), see option 2.
 * 1) Use SQL Enterprise Manager to mirror the source database device onto the target directory.
 * 2) Use SQL Enterprise Manager's unmirroring to Switch to Mirror Device - Replace Original Device.
 * 3) Use Explorer to delete (if desired) the source device, after verifying the mirror and unmirror succeeded.

Option 2
 Install the sp_movedevice stored procedure from the SQL Server Books Online (for more information, see the "Moving a Device" topic in the SQL Server Books Online). Run sp_helpdevice to determine the device name and current path. Run the following command:

sp_movedevice , ''

NOTE: If you are moving the master database, proceed to Step 4. Otherwise, skip to Step 8. In SQL Enterprise Manager, click the Server menu. Click SQL Server, then click Configure, followed by Parameters. Change the Master Database File option to reflect the new location. In SQL Enterprise Manager, click the Server menu. Click SQL Server, then Distributed Transaction Coordinator, followed by Configure.</li> Change the log drive designation and then click Reset Log.</li> Stop SQL Server and physically move the device to the new location.</li> Start SQL Server and verify that the database is working properly (for example, that the database is not marked Suspect).</li></ol>

Additional query words: SEM db dev DTC

Keywords: kbinfo KB181602

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.