How can I attach a database?

后端 未结 3 1209
半阙折子戏
半阙折子戏 2021-01-19 19:29

When I want to attach database, an error occurs:

The database \'Almizan\' cannot be opened because it is version 661.
This server supports versi

相关标签:
3条回答
  • 2021-01-19 19:45

    The this answer on the MSDN seems to tell us the obvious http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/01ed3b1c-6f29-4518-a3a4-e4e35decc05f/

    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.

    Ulrike - MSFT

    0 讨论(0)
  • 2021-01-19 19:46

    Think you need to upgrade the SQL Server 2008 instance (655) your trying to attach the database in, to SQL Server 2008 R2 (661), the version the database was actually created in.

    See SQL Server: Attach incorrect version 661

    0 讨论(0)
  • 2021-01-19 20:02

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

    0 讨论(0)
提交回复
热议问题