I receive the following message while trying to restore a database in our test system. I'm using a backup from our live server, restoring it to our test server. What am I missing?
cannot associate files with different databases ODBC SQLstate 42000
True backup... On live, I did a "backup database". When complete, I copied that file to the backup directory on the test server. Then I performed a "restore database" from device, navigate to that backup file.
1. Does the database ALREADY exist on the test server?
2. If so, does the directory structure where the MDF/LDF match where the MDF/LDF reside on the live server. In this I mean if the files on the live server were located in the C:\MyDir\Data folder, do they also reside like that on the test server?
IF NOT ... you need to use the WITH MOVE option to place the MDF and LDF in the folder(s) that are being used on your test server. If you are using the Restore wizard, you need to change the file path on the Options tab of the wizard. Change the path in the "Move to physical file name" option to the desired location.
A quick Google search on that came up with several pages referring to people trying to restore different DB types to SQL Server. Which leads me to ask, are you using 2 different versions of SQL Server (like 7 and 2000) between your machines?
Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.