How to update the device file locations in the 6.x master database (ISQL/w)

To update the device file locations in the 6.x master database

  1. On the Start menu, point to Programs/Microsoft SQL Server 6.x, and then click ISQL/w.
  2. Enter the sa password; then click Connect.
  3. Select from sysdevices in the master database to view the old device file locations.
  4. Execute sp_configure to allow updates to the system tables; then reconfigure with override.
  5. Update the device file locations that have changed.
  6. Execute sp_configure to disallow updates to the system tables; then reconfigure with override.
Examples

--View the old device file locations

SELECT physname FROM sysdevices

  

--Allow updates to the system tables

sp_configure ‘allow updates’,1

GO

RECONFIGURE WITH OVERRIDE

GO

--Update device file locations that have changed

UPDATE sysdevices

SET physname = "E:\Data\HR\HR1.dat"

WHERE name = "HumanResources1"

GO

UPDATE sysdevices

SET physname = "E:\Data\HR\HR1Log.dat"

WHERE name = "HumanResources1Log"

GO

--Disallow updates to the system tables

sp_configure ‘allow updates’,0

GO

RECONFIGURE WITH OVERRIDE

GO

  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.