Microsoft KB Archive/824421

= BUG: You receive an error message that contains a decimal representation of the SQL Server version number =

Article ID: 824421

Article Last Modified on 5/16/2007

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 7.0 Standard Edition
 * Microsoft SQL Server 6.5 Standard Edition
 * Microsoft SQL Server 6.0 Standard Edition

-



Bug #: 470085 (SQL Server 8.0)



SYMPTOMS
When you restore a system database from a backup device file in Microsoft SQL Server, you may receive an error message that is similar to the following:

The backup of the system database on device  cannot be restored because it was created by a different version of the server (134218407) than this server (134218488).

RESTORE DATABASE is terminating abnormally.

The error message contains version numbers in parentheses that are not valid (7.00.623 for SQL Server 7.0 or 8.00.760 for SQL Server 2000 Service Pack 3 [SP3], for example).



MORE INFORMATION
To determine the correct version of a database backup device file in SQL Server, run the RESTORE HEADERONLY Transact-SQL statement using the backup device file name. The RESTORE HEADERONLY Transact-SQL statement returns the following columns to help you determine the version of the database backup file:
 * SoftwareVersionMajor
 * SoftwareVersionMinor
 * SoftwareVersionBuild

For more information about the RESTORE HEADERONLY Transact-SQL statement, visit the following Microsoft Web site:

http://msdn2.microsoft.com/en-us/library/aa238455(SQL.80).aspx

The decimal number that indicates the version of SQL Server in the error message is obtained by converting part of the SQL Server version number to a hexadecimal representation. You can also manually determine the actual version number of SQL Server from the decimal number that is mentioned in the error message. To do so, follow these steps:
 * 1) Convert the decimal number that is mentioned in the error message to a hexadecimal representation.
 * 2) Convert only the last four digits of the hexadecimal representation to a decimal representation.
 * 3) Replace the last three digits of the hexadecimal representation with the decimal number from step 2.
 * 4) To determine the actual version number of SQL Server, format the result by using the information in the &quot;Standard format of SQL Server version numbers&quot; section of this article.

Note You can use the Calculator program in Microsoft Windows in Scientific view to convert the number from a decimal representation to a hexadecimal representation.

For example, to determine the actual SQL Server version number for the decimal number that is mentioned in the error message (134218407), follow these steps:
 * 1) Convert the decimal number 134218407 to a hexadecimal representation. The hexadecimal representation of 134218407 is 80002A7.
 * 2) Convert the last four digits of the hexadecimal representation to a decimal representation. The decimal representation of 02A7 is 679.
 * 3) Replace the last four digits of the hexadecimal representation with the decimal numbers that you obtained in step 2. The number is 800679.
 * 4) Format the number in step 3 by using the information in the &quot;Standard format of SQL Server version numbers&quot; section of this article. The version of SQL Server is 8.00.679.

Standard format of SQL Server version numbers
The version numbers of SQL Server use the following standard format:

..

For example, the version number of an instance of SQL Server 2000 SP3 is 8.00.760, where the first number (8) indicates the major version number, the next two numbers (00) indicate the minor version number, and the last three numbers (760) indicate the build number.

