Sql-server – Which SQL Server product does version 622 represent

restoresql server

I've manually attached the data and log files I received from a client to a SQL Server 2005 Express SP3 database. During the upgrade to SP4, I get the following error:

The database 'MyDatabase' cannot be opened because it is version 622. This server support version 612 and earlier. A downgrade path is not supported.

Does anyone know what database version 622 is and how I can install it? This database is from a Canadian customer so maybe it comes from an international version of SQL Server. I really wish there was a reference for the database versions so I knew what 622 is. Much Googling resulted in much frustration and no answers.

Adding some more information. The original database was corrupt. I was only able to restore it using a backup. The data files were a little newer (2 days) so we were seeing if we could use those as well.

Upgraded from SQL Server 2005 Express to SQL Server 2008 Express successfully while the corrupt database was attached. SELECT @@VERSION reports Microsoft SQL Server 2008 (RTM) – 10.0.1600.22 (Intel X86). I ran sp_resetstatus, SET EMERGENCY and DBCC CHECKDB and received the following:

Msg 946, Level 14, State 1, Line 1
Cannot open database 'MyDatabase' version 622. Upgrade the database to the latest version.

Best Answer

622 is an internal intermediate version, never released. How come you have an 622 version DB? The explanation is simple actually: an aborted upgrade. Look at the sequence Aaron posted:

Converting database 'x' from version 611 to the current version 655. 
Database 'x' running the upgrade step from version 611 to version 621. 
Database 'x' running the upgrade step from version 621 to version 622. 
Database 'x' running the upgrade step from version 622 to version 625.

If the last step above crashes, your database is a version 622 now (each step commits). This version can only be attached to a SQL Server 2008 (or newer) to continue and finish the upgrade. It seems to me you had a SQL Server 2005 DB (v. 611) you attached to a SQL Server 2008 or higher, it started to upgrade but the upgrade failed at step 622->625 and now you're trying to attach it back to the SQL 2005 instance. It can't be re-attached, your only chance is to try to move forward. If the upgrade continue to fail, you will have to start again from an original SQL 2005 database (a copy of the files, a backup...).

Why would a database upgrade fail? Same reason any operation can fail: CTRL-C, power outage, corrupted original database, hardware problems, bugs in the product. Knowing what the upgrade step 622-625 does, my moneys are on a corrupted source DB. Recovering from a failed upgrade is a bit more tricky. As usual, having a good, tested, backup and restore strategy pays off.