Friday, September 21, 2007

Restoring databases to Server 2005

Whilst attempting to restore a database backup to SQL Server 2005, I encountered a "restore failed" error due to "the file or filegroup cannot be selected for this operation". After some trawling of the Net, I found the solution.

There is an option in the Restore window to copy the script generated to the clipboard. Cancel out and paste the script into a New Query. Delete the two "FILE = " options from the line then execute the script. Bingo, you have a newly restored database.

3 comments:

Anonymous said...

Don't know why it works. Don't care. Thanks.

Anonymous said...

works a treat, thanks!

Anonymous said...

Worked for me too! Thanks a lot!!