Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rename SQL backup file

Status
Not open for further replies.

sunwindandsea

Programmer
Dec 20, 2001
116
US
Hello,

I converted some data on server1 and moved the backup.bak file to server2. When I try to restore the backup I receive the error message that I'm try to restore a different database.

Database name : server1\sqlexpress\file.bak

I think that I need to rename the backup file to the following:

server2\sqlexpress\file.bak

Is my analysis correct and how do I rename the server attached to the database?

Thanks,

Ed
 
No, you need to use the with move option in your restore. Look up RESTORE DATABASE in BOL.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Thanks for th quick response ptheriault,

I understand how to detach and move databases but how do I deal with the '.bak' extension? The old server crashed and this file was restored from a tape backup.


Ed

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top