** Updated on 10/13/2014 with latest SQL Server 2014 release information **
To ensure my clients and I are running on the proper version of SQL Server I have created a reference table that contains all the SQL Server versions since 7.0.
The script to create the table is too large to include here, but I have added an option to download it at the bottom of this post.
How do I know what SQL Server version I am running?
To determine what version of SQL Server you are running you can use the following query:
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
This query will return the product version number, the level (RTM, etc) as well as the edition of the SQL Server you are connected to.
Once you know that information, you can use some of it to get more details of the version you are running, and determine just how current your patching of SQL Server is.
The following script returns the information from the table I provide at the end of this script, and compares it to the product version of the server to let you know exactly where you are in the patching cycle.
SELECT Build ,
[File version] ,
[Date Updated] ,
WHERE Build = SERVERPROPERTY('productversion')
AWESOME! Where do I get this table so I can start using it?
As promised, here is the script that creates the table, as well as populates it.
It is too large to stick directly in the blog post, but you can download it here: