Guest_imported
New member
- Jan 1, 1970
- 0
I am trying to move the transaction log from one drive to another because it is full. I have tried the following script:
sp_detach_ db 'database'
go
sp_attach_db 'database', 'c:\msql7\data\datafile.mdf',
'f:\mssql7\data\logfile.ldf'
but, I get an error message stating that the script can't execute because the database is currently in use. Does anyone know a better way of doing this? Thanx!
sp_detach_ db 'database'
go
sp_attach_db 'database', 'c:\msql7\data\datafile.mdf',
'f:\mssql7\data\logfile.ldf'
but, I get an error message stating that the script can't execute because the database is currently in use. Does anyone know a better way of doing this? Thanx!