SQL 7 Backup and Restore Problem

greenspun.com : LUSENET : SQL Server Database Administration : One Thread

Mr Eric,

I am back with a different question and I hope asusual you will answer it in a flash.. The question is as follows:

I am running SQL Server 7 and I have two database sitting on this server. Database A is Service and it's sitting on Drive C:\. Database B is sitting on Drive D:\ and it's name is Globe.

I have a backup copy of Database A which is Service and I want to load that backup copy into Database Globe. I tried loading it using the Enterprise manager, but it moved my Globe data files to the path of Service Database which is Drive C:\.

My question, How can I load the service database copy into Globe database without letting SQL move my data files of Globe? And also, how can I load database's on different path's without letting system moving the data files?

Would you please put this in steps please...

In advance, Thank your very much for your help.

Kaleem.

-- Anonymous, December 01, 1999

Answers

Kaleem,

You will need to use Transact SQL for this task. Specifically, you will need to use the RESTORE DATABASE statement with the MOVE clause to move the files to the D:\ drive. You will find instructions in the SQL Server Books Online articles titled, "How to restore a database with a new name (Transact-SQL)" and "How to restore files to a new location (Transact-SQL)".

Hope this helps,

Eric

-- Anonymous, December 13, 1999


Moderation questions? read the FAQ