BlackWaspTM

This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

SQL Server
SQL 2000+

Determining the SQL Server Version

Software developed for use with SQL Server may be executed on many different versions of the database management system (DBMS). Sometimes you will need to know the edition and service pack level in use to optimise a program or to avoid known issues.

ServerProperty Function

The ServerProperty function can be executed using Transact-SQL (T-SQL) to determine information about the current SQL Server instance. The function permits the extraction of three key property values that describe the version of the instance. These are the product version, level and edition.

Product Version

The SQL Server product version is a multi-part number that can be used to identify the major release number and service pack level of the DBMS. To retrieve the number, the following command is executed:

SELECT serverproperty('ProductVersion')

The command returns one of the many possible version numbers for SQL Server. The following table lists the meanings of some of the key version numbers available at the time of writing. The table is not exhaustive as version numbers change as patches are applied. However, the number always increases with new versions making it easy to check for a minimum version requirement.

NB: The first part of the number can be used to quickly identify the major release of the DBMS; version 8 for SQL Server 2000, version 9 for SQL Server 2005, etc.

Version NumberDescription
8.00.194SQL Server 2000
8.00.384SQL Server 2000 Service Pack 1
8.00.534SQL Server 2000 Service Pack 2
8.00.760SQL Server 2000 Service Pack 3 (or 3a)
8.00.2039SQL Server 2000 Service Pack 4
9.00.1399SQL Server 2005
9.00.2047SQL Server 2005 Service Pack 1
9.00.3042SQL Server 2005 Service Pack 2
9.00.4035SQL Server 2005 Service Pack 3
9.00.5000.00SQL Server 2005 Service Pack 4
10.00.1600.22SQL Server 2008
10.00.2531.00SQL Server 2008 Service Pack 1
10.00.4000.00SQL Server 2008 Service Pack 2
10.00.5500.00SQL Server 2008 Service Pack 3
10.50.1600.1SQL Server 2008 R2
10.50.2500.2SQL Server 2008 R2 Service Pack 1
11.00.2100.60SQL Server 2012

Product Level

The product level property returns a human-readable value indicating the service pack level of SQL Server that is in use. The value does not include the major release number (eg. 2000, 2005) for the DBMS so is generally used in conjunction with the product version property.

To use the property, the ServerProperty function is executed with the "ProductLevel" parameter.

SELECT serverproperty('ProductLevel')

Product Edition

The product edition property allows the determination of the edition of the current SQL Server instance. This allows you to distinguish between Enterprise edition, Developer Edition, Express Edition, etc. The text that is returned from the property is human-readable.

SELECT serverproperty('Edition')
12 April 2008