Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I attach a database?

When I want to attach database, an error occurs:

The database 'Almizan' cannot be opened because it is version 661.
This server supports version 655 and earlier. A downgrade path is not supported.
Could not open new database 'Almizan'. CREATE DATABASE is aborted.
(.Net SqlClient Data Provider)

Help me to attach this database.

like image 766
mj-gholami Avatar asked Feb 21 '23 16:02

mj-gholami


1 Answers

Install SQL Server 2008 EXPRESS R2. There is a bug in the Web Platform Installer and it still thinks EXPRESS R1 is the latest version.

SQL Server 2008 databases are version 655. SQL Server 2008 R2 databases are 661. You are trying to attach an 2008 R2 database (v. 661) to an 2008 instance and this is not supported. Once the database has been upgraded to an 2008 R2 version, it cannot be downgraded. You'll have to either upgrade your 2008 SP2 instance to R2, or you have to copy out the data in that database into an 2008 database (eg using the data migration wizard, or something equivalent).

The message is misleading, to say the least, it says 662 because SQL Server 2008 SP2 does support 662 as a database version, this is when 15000 partitions are enabled in the database, see Support for 15000 Partitions.docx. Enabling the support bumps the DB version to 662, disabling it moves it back to 655. But SQL Server 2008 SP2 does not support 661 (the R2 version).

like image 154
Romil Kumar Jain Avatar answered Feb 23 '23 11:02

Romil Kumar Jain