How to get SQL Server Edition, Version related info?

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:

select @@version 



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.

SERVERPROPERTY('ProductVersion') AS ProductVersion,
SERVERPROPERTY('ProductLevel') AS ProductLevel,
SERVERPROPERTY('Edition') AS Edition,
SERVERPROPERTY('MachineName') AS ServerName,
SERVERPROPERTY('Collation') AS ServerCollation


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

exec xp_msver


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.

exec xp_msver ProcessorCount




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


4 Comments on “How to get SQL Server Edition, Version related info?”

  1. I know it’s an old post. But, I’ll try… There’s an easy way to find out the version and the edition with the SQL turned off?

Leave a Reply

Your email address will not be published.