This topic describes how to identify the current SQL Server version number and the corresponding product level or service package (SP) level. It also describes how to identify the specific version of SQL Server 2000 or SQL Server 7.0 used.
How to determine the version of SQL Server 2005 running
To determine the version of the running SQL Server 2005, use SQL Server Management studio to connect to SQL Server 2005 and run the following statements:
Select serverproperty ('productversion'), serverproperty ('productlevel'), serverproperty ('version ')
The running result is as follows: • Product Version (for example, "9.00.1399.06 ").
• Product level (for example, "RTM ").
• Version (for example, "Enterprise Edition ")
For example, the running result may be similar to the following: 9.00.1399.06 RTM Enterprise Edition
The following table lists the version numbers of sqlservr.exe: the release version of sqlservr.exe.
RTM 2005.90.1399
SQL Server 2005 Service Pack 1 2005.90.2047
How to determine the version of SQL Server 2000 running
To determine the version of SQL Server 2000 that is running, use the query analyzer to connect to SQL Server 2000, and then run the followingCode:
Select serverproperty ('productversion'), serverproperty ('productlevel'), serverproperty ('version ')
The running result is as follows: • Product Version (for example, 8.00.534 ).
• Product level (for example, "RTM" or "SP2 ").
• Version (for example, "Standard Edition "). For example, the running result may be similar to the following:
8.00.534 RTM Standard Edition
The following table lists the version numbers of sqlservr.exe: the release version of sqlservr.exe.
RTM 2000.80.194.0
SQL Server 2000 sp1 2000.80.384.0
SQL Server 2000 sp2 2000.80.534.0
SQL Server 2000 sp3 2000.80.760.0
SQL Server 2000 sp3a 2000.80.760.0
SQL Server 2000 SP4 2000.8.00.2039
How to determine the version of SQL Server 7.0 running
To determine the version of SQL Server 7.0 that is running, connect to SQL Server 7.0 using the query analyzer and run the following code:
Select @ version
The running result is similar to the following:
Microsoft SQL Server 7.00-7.00.623 (Intel x86) Nov 27 1998 22: 20: 07 copyright (c) 1988-1998 Microsoft configurationdesktop edition on Windows NT 5.1 (build 2600 :)
Note: In this example, the version number is 7.00.623.
Use the version number in the following table to identify the product level or service pack level: Version Number Service Pack
7.00.1063 SQL Server 7.0 Service Pack 4 (SP4)
7.00.961 SQL Server 7.0 Service Pack 3 (SP3)
7.00.842 SQL Server 7.0 Service Pack 2 (SP2)
7.00.699 SQL Server 7.0 Service Pack 1 (SP1)
7.00.623 SQL Server 7.0 RTM (release to manufacturing)
If the version number of the @ Version Report is not listed in this table, patches are installed on the running SQL Server. Program Or securely update the internal version of the program. For example, if the @ Version Report version is 7.00.859, you are running SQL Server 7.0 SP2 with the patch installed. The version number of each new version of sqlservr.exe executable file is increased. For more information, see the readme.txt file of the patch or security update program.
How to determine the version of SQL Server 6.5 running
To determine the version of SQL Server 6.5 that is running, use isql_w to connect to SQL Server 6.5 and run the following code:
Select @ version
Use the version number in the following table to identify the product level or service pack level: Version Number Service Pack
6.50.479 SQL Server 6.5 Service Pack 5A (sp5a) Update
6.50.416 SQL Server 6.5 Service Pack 5A (sp5a)
6.50.415 SQL Server 6.5 Service Pack 5 (SP5)
6.50.281 SQL Server 6.5 Service Pack 4 (SP4)
6.50.258 SQL Server 6.5 Service Pack 3 (SP3)
6.50.240 SQL Server 6.5 Service Pack 2 (SP2)
6.50.213 SQL Server 6.5 Service Pack 1 (SP1)
6.50.201 SQL Server 6.5 RTM
If the version number of the @ Version Report is not listed in this table, the running SQL Server installs the patch or security update internal version. The version number of each new version of sqlservr.exe executable file is increased. For more information, see the readme.txt file of the patch or security update program.
How to determine the version of the running SQL Server
If you cannot determine the version of the running SQL Server, the last line in the output returned by @ version will report the version you are connected. The example used in this article is SQL Server 5.0 Standard Edition installed on Windows NT 2195 (internal version 2000: Service Pack 2. Service Pack 2)
Note: The earlier version information and service pack information are applicable to the operating system and SQL Server.
Standard Edition on Windows NT 5.0 (build 2195: Service Pack 2)