--check the location of the files
Use databasename
GoExec sp_helpfile
--detach the database name
Exec sp_detach_db 'databasename'
Exec sp_detach_db 'databasename'
--copy the mdf and ldf files to the location
--attach the databasename
Exec sp_attach_db 'databasename',
'D:\sqldata\GPSBSBBVDat.mdf',
'G:\sqldata\GPSBSBBVLog.ldf'
'G:\sqldata\GPSBSBBVLog.ldf'
No comments:
Post a Comment