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.