How to check the version of sqlserver

Method 1 : Connect to the server by using Object Explorer in SQL Server Management Studio. Once connected to Object Explorer, it will display version information (in parentheses), and the username used to connect to a specific instance of SQL Server.
Method 2 : Look at the first few lines of the instance's error log file. By default, the error log is located in the Program Files\Microsoft SQL Server\MSSQL.n \ MSSQL \ LOG\ERRORLOG and ERRORLOG.n files. The log entry 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 <X64> (Build 7600:)

As you can see, this entry provides all the necessary information about the product, such as version, product level, 64-bit or 32-bit, version of SQL Server, and the version of the operating system that SQL Server is running on.
Method 3 : Connect to the instance of SQL Server and run the following query:

Select @@version

An example output from 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 <X64> (Build 7600:))

Method 4 : Connect to the instance of SQL Server and run the following query:

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'),SERVERPROPERTY ('edition')

Note This query applies to any instance of SQL Server 2000 or later.
The results are as follows:

  • Product version (for example, 10.0.1600.22)
  • Product level (eg, RTM)
  • Edition (for example, Enterprise)

For example, the run result might look like the following. 

10.0.1600.22 RTM Enterprise Edition

Note that the SERVERPROPERTY function returns a single property related to version information, while the @@VERSION function combines the output into a single string. If your application requires individual attributed strings, you can use the SERVERPROPERTY function to return them instead of parsing the @@VERSION result

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326120922&siteId=291194637