This was very odd because there was in fact no other database with the same name on the database server. The error message was clearly wrong. And after I clicked Ok on the above error message, a database was still created on the server albeit a faulty one that needed to be removed before the attach/restore action could be tried again.
To troubleshoot I tried to attach the database using the command line as follows:
USE [master]And once I did so the following error message was displayed which revealed the real issue that SQL was having in trying to attach the database:
GO
CREATE DATABASE [XXX_MSCRM] ON
( FILENAME = N'E:\SqlData\XXX_MSCRM.mdf' ),
( FILENAME = N'E:\SqlLogs\XXX_MSCRM.ldf' )
FOR ATTACH ;
GO
A little bit of research revealed that the issue had to do with the fact that the original database was installed on SQL Server Enterprise whereas the database I was trying to restore it on was SQL Server Standard. And the following KB article describes what the issue is and how to go about resolving:
http://support.microsoft.com/kb/2567984
In short:
- Restore the database to another SQL Enterprise environment
- Run the script in the above KB article
- Backup the database and restore to a SQL Standard environment
No comments:
Post a Comment