SQL Server system information

SQL Server system information

  • Comments 2

I guess many of you are familiar with build in SQL server function @@version, which you can use to quickly tell what SKU of SQL Server and Windows OS you are using as well as build numbers. Perhaps you are also aware of  serverproperty(param) function which tells you similar things eg your SQL Server instance name, if it is clustered or not etc.

Simple query below uses serverproperty function to tell you system level info about SQL Server.

I build it just recently for a small pet project of mine and decided to post it here just in case someone finds it useful too :)  

select 

serverproperty('ProductVersion') as [SQL server build number],

serverproperty('Edition') as [SQL server SKU],

serverproperty('ProductLevel') as [SQL server service pack level],

serverproperty('IsClustered') as [Is SQL server clustered],

serverproperty('MachineName') as [Windows server name],

serverproperty('ServerName') as [Full SQL server instance name],

serverproperty('InstanceName') as [SQL server instance name],

serverproperty('ProcessID') as [SQL server Windows process ID],

serverproperty('Collation') as [SQL server instance collation] 

Comments
  • Thank you.. You are so generous

  • i realy sutisfied with ur solution i need more about new technology in sql those are coming in market.

    ur solotion is very good for my poit of view .

    Thank you

Page 1 of 1 (2 items)
Leave a Comment
  • Please add 5 and 7 and type the answer here:
  • Post