How to determine the version and edition of SQL Server and its components


How to determine the version and edition of SQL Server and its components
https://support.microsoft.com/en-us/kb/321185

How to determine which version and edition of SQL Server Database Engine is running

To determine the version of SQL Server, you can use any of the following methods:

Method 1: Connect to the server by using Object Explorer in SQL Server Management Studio. After Object Explorer is connected, it will show the version information in parentheses, together with the user name that is used to connect to the specific instance of SQL Server.

Method 2: Look at the first few lines of the Errorlog file for that instance. By default, the error log is located at Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\ERRORLOG and ERRORLOG.nfiles. The entries may resemble the following:
2011-03-27 22:31:33.50 Server      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  (Build 7600: )
As you can see, this entry gives all the necessary information about the product, such as version, product level, 64-bit versus 32-bit, the edition of SQL Server, and the OS version on which SQL Server is running.

Method 3: Connect to the instance of SQL Server, and then run the following query:
Select @@version
An example of the output of this query is as follows:

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  (Build 7600: )
 
 
Method 4: Connect to the instance of SQL Server, and then run the following query:

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition') 
 
Note This query works with any instance of SQL Server 2000 or of a later version.

The following results are returned:
  • The product version (for example, 10.0.1600.22)
  • The product level (for example, RTM)
  • The edition (for example, Enterprise)
For example, the results resemble the following.
10.0.1600.22RTMEnterprise Edition
Note The SERVERPROPERTY function returns individual properties that relate to the version information, although the @@VERSIONfunction combines the output into one string. If your application requires individual property strings, you can use the SERVERPROPERTY function to return them instead of parsing the @@VERSIONresults. 

No comments:

Post a Comment