SQL Restore Mystery
-
I have a MS-SQL production database on a server running under the default instance. I have a copy of that database running on my desktop under the NetSDK instance of MSDE. I created a new copy of MSDE on a laptop to demo the product. It is also a named instance (NetSDK). The mystery is that I can create a database backup on the production server (db file path is c:\program files\Microsoft SQL server\MSSQL\Data\database.mdf), copy it to my machine and restore it (I use Access to restore it.) Works in spite of the fact that the data files are in slightly different paths (MSSQL\Data versus MSSQL$NETSDK\Data). But if I try to restore the backup on the new laptop installation it blows up telling me I need to use the RESTORE WITH MOVE. As an interim solution, I am backing up the server, restoring on the desktop, then backing up the desktop and restoring the second backup to the laptop. Can anyone tell me why the restore works on the desktop but not the laptop? I would like to avoid this giant shuffling of files if possible. Thx Mark Jackson
-
I have a MS-SQL production database on a server running under the default instance. I have a copy of that database running on my desktop under the NetSDK instance of MSDE. I created a new copy of MSDE on a laptop to demo the product. It is also a named instance (NetSDK). The mystery is that I can create a database backup on the production server (db file path is c:\program files\Microsoft SQL server\MSSQL\Data\database.mdf), copy it to my machine and restore it (I use Access to restore it.) Works in spite of the fact that the data files are in slightly different paths (MSSQL\Data versus MSSQL$NETSDK\Data). But if I try to restore the backup on the new laptop installation it blows up telling me I need to use the RESTORE WITH MOVE. As an interim solution, I am backing up the server, restoring on the desktop, then backing up the desktop and restoring the second backup to the laptop. Can anyone tell me why the restore works on the desktop but not the laptop? I would like to avoid this giant shuffling of files if possible. Thx Mark Jackson
When you are restoring on the laptop, check the physical destination path of the data files being restored. It might be pointing to a different directory than the default data directory present on the laptop. Or maybe there are the "same named" .mdf and .ldf files already present in the data folder of the laptop. cheers, [r a w] Little Johnny was a scientist. Little Johnny is no more. For what he thought was H2O, turned out to be H2SO4.