Hi All,

Today’s Question of the day is: How to get SQL Server Edition, Version related info?

SQL Server build related info can be retrieved in no. Of ways, we’ll talk about three of them:

  • @@Version Function

The return type of select @@version is nvarchar. It has few other Functions also like:

1_How_to_get_SQL_Server_Edition_Version_related_info

  • SERVERPROPERTY() Function

This returns property info about the Server Instance. The example below uses Serverproperty function in a select query to return info related to SQL Server  Product Level, Version, Edition along with Server Name and its collation.

2_How_to_get_SQL_Server_Edition_Version_related_info

  • XP_MSVER extended Stored Procedure

This extended stored Procedure returns version information about Microsoft SQL Server. It also returns information about the build number of the server and information about the server environment. This information can be used within Transact-SQL statements, stored procedures, and so on, to enhance logic for platform-independent code. This procedure also returns info about OS & Hardware of the server like WindowsVersion, ProcessorCount, ProcessorType, PhysicalMemory etc.

3_How_to_get_SQL_Server_Edition_Version_related_info

If executed without any Parameter it returns information about all Properties, otherwise the output can be restricted to one parameter info by providing property name as a parameter.

4_How_to_get_SQL_Server_Edition_Version_related_info

 

Regards

Sarabpreet Anand

Like us on FaceBook Follow us on Twitter | Join the fastest growing SQL Server group on FaceBook

Follow me on Twitter  |  Follow me on FaceBook