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)

3 Answers
3

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).

When you attached the database to SQL Server 2008 to compress it the
database has automatically been upgraded from SQL 2005 to to SQL
Server 2008 from the disk structucture point of view. An internal
upgrade script has been run and has modified the on-disk structure of
the database to that new version. This can be seen at the version 655.
Once this has been done you can no longer attach the upgraded database
to a lower version of SQL Server, it will fail with the error you've
seen.

This has nothing to do with the compatiblity level of the database.
The compatabilty level only prevents the engine from using some of the
new features.

In order to get the database on SQL Server 2005 again you will need to
create the database freshly and export/import the data, for example by
using the Export/Import Wizard.