Thursday 16 June 2011

How to find what SQL Server version you have via TSQL

There are two methods you can use to find the SQL Server version via TSQL. You can use this via the query window in SSMS. (Remember to connect to the correct server instance)

Method 1 : Select @@version

This will give you the following format of output:

Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64)   Mar 29 2009
10:11:52   Copyright (c) 1988-2008 Microsoft Corporation  Express
Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: )


Method 2 : SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

This will give you the following format of information:

10.0.1600.22RTMEnterprise Edition


Useful Links:

For more details and further ways to find out versions try the following link.
http://support.microsoft.com/kb/321185

No comments:

Post a Comment