How to tell what SQL Server version you are running

19 Jul

How to tell what SQL Server version you are running
By: Greg Robidoux | Read Comments (14) | Related Tips: 1 | 2 | 3 | More > SQL Server Configurations
Problem
One issue that I am often faced with is determining what service pack is installed on the SQL Server. In this tip we look at how to find the version of SQL Server that is running and also what service pack or hotfix is installed.

Solution
There are a few ways to determine the version of SQL Server that is installed.

Method 1
The first is by using either Enterprise Manager or SQL Server Management Studio and right clicking on the instance name and selecting properties. In the general section you will see information such as on the following screenshots. The “Product version” or “Version” gives you a number of the version that is installed. As you can see with the SQL Server 2000 screenshot it also shows you the service pack that is installed.

SQL Server 2000
SQL Server 2000 version information

SQL Server 2005
SQL Server 2005 version information

SQL Server 2008 / 2008 R2 / 2012 / 2014
This will look simiilar for all of these versions.

SQL Server 2008 version information

Method 2
Another option is to run the T-SQL command to give you this information. As you can see the output from the different versions is pretty much the same. The one thing that you do not get when you do this is the Service Pack name like you do in Enterprise Manager.

SELECT @@VERSION
When this is run it will give you information such as the following:

SQL Server 2000
Microsoft SQL Server 2000 – 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

SQL Server 2005
Microsoft SQL Server 2005 – 9.00.1399.06 (Intel X86)
Oct 14 2005 00:33:37
Copyright (c) 1988-2005 Microsoft Corporation
Developer Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

SQL Server 2008
Microsoft SQL Server 2008 (SP1) – 10.0.2573.0 (X64)
Feb 4 2011 11:27:06
Copyright (c) 1988-2008 Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)

SQL Server 2008 R2
Microsoft SQL Server 2008 R2 (RTM) – 10.50.1600.1 (X64)
Apr 2 2010 15:48:46
Copyright (c) Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2)

SQL Server 2012
Microsoft SQL Server 2012 – 11.0.2100.60 (X64)
Feb 10 2012 19:39:15
Copyright (c) Microsoft Corporation
Web Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor)

SQL Server 2014
Microsoft SQL Server 2014 – 12.0.2254.0 (X64)
Jul 25 2014 18:52:51
Copyright (c) Microsoft Corporation
Developer Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1) (Hypervisor)

Method 3
Another option to determine what version of SQL Server is installed is to look at the version of the SQL Server files. This is an option if SQL Server is not running and you need to find the version.

Open Windows Explorer and navigate to the folder where SQL Server is installed such as “C:\Program Files\Microsoft SQL Server\MSSQL10.SQL2008\MSSQL\Binn”, for SQL Server 2008.

Find file sqlservr.exe and right click and select properties and a window will open like the one below. Here we can see that this file is version 10.0.2573.0.

SQL Server version from file

So now that you have this number such as 9.00.1399.06 or 8.00.760 what do these even mean? The first digits refer to the version of SQL Server such as:

8.0 for SQL Server 2000
9.0 for SQL Server 2005
10.0 for SQL Server 2008
10.5 for SQL Server 2008 R2
11.0 for SQL Server 2012
12.0 for SQL Server 2014
Here are a couple of links to other articles that give you the details of what is installed for SQL Server 6.0, 6.5, 7.0, 2000, 2005, 2008, 2008 R2, 2012 and 2014 based on the version number that is returned.

SQL Server versions
SQL Server Builds and Service Pack Information (this is the most complete list)
How to identify your SQL Server version and edition
SQL Server Service packs and Versions
SQL Server Service Pack Tips
Next Steps
Keep these links handy to determine what version of SQL Server you are running