Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Move SQL 7 data and log file

Author  Topic 

wolfgang2010
Starting Member

6 Posts

Posted - 2010-05-05 : 09:42:35
I need to move the location of my database files to another disk because of running out of disk space issues. I don't want to detach, attach because that means having to re-do my very time consuming replication scripts. I noticed this which I modified for my testing on a small db.

RESTORE DATABASE archive
FROM DISK = 'C:\MSSQL7\BACKUP\archive_backup.bak'
WITH MOVE 'Archive_' TO 'F:\archive.mdf',
MOVE 'Archive' TO 'F:\archive.ldf'
GO

It worked however the only thing on my F drive is archive.ldf and archive.mdf is nowhere? Yet the database is still active and I can see data. What the heck? Please help :)

El
   

- Advertisement -