I have a database on SQL Server 2008 R2.

I want to attach it on a SQL Server Express 2008 instance running on Windows 2003.

I set the SQL server compatibility level on the database to SQL Server 2005 in SQL Server 2008 R2 Management Studio before detaching.

But I can't attach this database to my SQL 2008 instance running on Windows 2003 due to a "compatibility error".

How can I get around this?

  • 2
    possible duplicate of How do I downgrade a SQL 2008 MDF file for use in SQL 2005? and many others. This is not a "compatibility level" error
    – gbn
    Sep 18 '11 at 13:10
  • @gbn I though it was compatibility level prblem
    – shaahin
    Sep 18 '11 at 13:13
  • @Aaron Bertrand Some one said me its not possible to install sql server R2 on windows server 2003 32 bit.
    – shaahin
    Sep 18 '11 at 13:14
  • 4
    You need to apply SP2 to the operating system, but "some one" was wrong. Why listen to "some one" when you can check the source? Operating system support is not a secret. msdn.microsoft.com/en-us/library/ms143506.aspx Sep 18 '11 at 13:29

You can't attach a SQL Server 2008 R2 database to a SQL Server 2008 or 2005 instance. You can only go up, not down; you can't make your 2008 R2 database compatible with previous versions. The solution is to remove your Express instance and replace it with a 2008 R2 instance, then you will be able to attach your database...

  • Thank you :] Is it possible to install Sql server R2 instance on Windows server 2003 32 bit ?
    – shaahin
    Sep 18 '11 at 13:11
  • 4
    Yes, you can do that. Sep 18 '11 at 13:11
  • Thanks and last question : windows server is not R2 nevertheless I can install sql server R2 instance on it?
    – shaahin
    Sep 18 '11 at 13:16
  • 3
    Again, yes, you can do that. Sep 18 '11 at 13:30

I ran into a similar issue once. I attached a 2000 DB to a 2005 instance, figured out it was the wrong instance, but now I was not able to attach it back to the 2000 instance. What I ended up doing was an export of the tables/objects from the 2005 instance and then imported it back to the 2000 instance.

Fortunately for me, the DB was very small and I did not miss any functionality during the export/import process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.