How Do I Restore 1 Database To Another?

  • 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

     

     

  • 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.

     

  • Michael,

    Could you post an example of what the syntax for the Restore with Move would look like?

    Thanks.

  • The RESTORE command with the MOVE option is documented in SQL Server 2005 Books Online.

    http://msdn2.microsoft.com/en-us/library/ms186858.aspx

     

     

  • 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