共用方式為


SQL Server system information

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

  • Anonymous
    January 30, 2010
    Thank you.. You are so generous

  • Anonymous
    July 23, 2010
    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