How to Check the Version, Service Pack and Edition of Microsoft SQL Server on a Machine? Options

codeling Posts: 1057 Points: 4443
Posted: Sunday, January 17, 2016 9:09:21 AM

The following example shows returning the version information for the current installation.

SELECT @@VERSION AS 'SQL Server Version';

SQL Server Version

---------------------

Microsoft SQL Server 2012 - 11.0.5343.0 (X64) May  4 2015 19:11:32 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )

 

The @@VERSION Returns system and build information for the current installation of SQL Server.

  • SQL Server version

  • Processor architecture

  • SQL Server build date

  • Copyright statement

  • SQL Server edition

  • Operating system version


codeling Posts: 1057 Points: 4443
Posted: Sunday, January 17, 2016 9:19:23 AM

If you don't need the version information in your code, then you can get it in the SQL Server Management Studio.

Start 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.


codeling Posts: 1057 Points: 4443
Posted: Sunday, January 17, 2016 9:33:21 AM

The SERVERPROPERTY function returns property information about the server instance.

Run the following query in your SQL Server:

SELECT SERVERPROPERTY('productversion') as 'Version',

       SERVERPROPERTY ('productlevel') as 'Service Pack',

       SERVERPROPERTY ('edition') as 'Edition';

 

Version       Service Pack  Edition

--------      ------------  -------

11.0.5343.0   SP2            Enterprise Edition (64-bit)

 

Users browsing this topic
Guest