February 5, 2007 at 10:54 am
In my SQL 2005 installation I have two databases, let's call them Database 1 and Database 2.
I made a full backup of Database 1 and tried to restore it Database 2.
When I try to do the restore to Database 2, I get an error saying: "The File 'C:\Program Files\Microsoft SQL Server\MSSQL\FTDATA\ftcat_document' cannot be overwritten. It is being used by the database 'Database 1'
My goal is to make a complete copy of Database 1 and put it into Database 2. Should I have used the Copy function instead of the Backup and Restore function to do this?
Thanks.
Rick Bellefond
February 5, 2007 at 11:21 am
When you restore database 2, you cannot use the same physical filenames as database 1.
You will have to specify new physical file names for database 2 using WITH MOVE in the RESTORE command.
February 5, 2007 at 11:38 am
Michael,
Could you post an example of what the syntax for the Restore with Move would look like?
Thanks.
February 5, 2007 at 11:46 am
The RESTORE command with the MOVE option is documented in SQL Server 2005 Books Online.
http://msdn2.microsoft.com/en-us/library/ms186858.aspx
February 5, 2007 at 3:44 pm
Michael,
Ok, thank you.
Rick Bellefond
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply