April 28, 2008 at 12:15 pm
Im trying to restore a database from a standalone server to a cluster configuration. i only have the BAK file, and i cant get around this error:
System.Data.SqlClient.SqlError: Cannot use file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\CMS_DB.mdf' for clustered server. Only formatted files on which the cluster resource of the server has a dependency can be used. (Microsoft.SqlServer.Smo)
And if i try to create the database first, and then restore the BAK file, i get this error:
System.Data.SqlClient.SqlError: The backup set holds a backup of a database other than the existing 'CMS_DB' database. (Microsoft.SqlServer.Smo)
Off course the Microsoft help link is not any god 🙁
Can any one help me out here?
Kind regards
Bjørn Andersen
April 28, 2008 at 1:37 pm
I would say you need to use the 'with move' option when restoring the database to move the database files to drives that are in the dependancies list of the SQL resource in your cluster
see BOL but basically
restore database dbname from disk = 'path to .bak file'
with move 'data file logical name' to 'new physical location',
move 'log file logical name' to 'new physical location'
use restore database filelistonly from disk = 'path to .bak file'
to see file names and existing locations
delete those files you created earlier.
---------------------------------------------------------------------
April 28, 2008 at 2:15 pm
I think George it right. be sure you're restoring from the clustered server and not one of the instances on one of the boxes.
April 29, 2008 at 2:12 am
Okay off cource that did the trick. But as i recall it, in SQL server 2000 it was possible to make the changes directly in the gui. This is not possible in SQL server 2005. So you has to write the restore script manually. Any way - this may be a better way to do it 🙂
Thanks for the help to both of you.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply