How to find sql server version,edition,Server Name?
SQL Server provides a System Defined function SERVERPROPERTY(propertyname) .
By using this function you can find a number of things
Property Name
|
Description
|
syntax
|
Edition
|
Return SQL Server edition installed on machine.
|
select ServerProperty('edition')
|
EditionID
|
return Edition ID
|
select ServerProperty('editionid')
|
InstanceName
|
Return instance name if it is not default.In case of default return Null.
|
select ServerProperty('InstanceName')
|
ProductVersion
|
return Product version
|
select ServerProperty('ProductVersion')
|
BuildClrVersion
|
return version of the .NET framework Common Language Runtime (CLR)
|
select ServerProperty('BuildClrVersion')
|
EngineEdition
|
return
1 = Desktop
2 = Standard
3 = Enterprise
4 = Express
5 = SQL Azure
|
select ServerProperty('EngineEdition')
|
IsClustered
|
Server instance is configured in a failover cluster.
1 = Clustered.
0 = Not Clustered.
NULL = Input is not valid, or an error.
|
select ServerProperty('IsClustered')
|
MachineName
|
Return machine name
|
select ServerProperty('MachineName')
|
ResourceLastUpdateDateTime
|
Returns the date and time that the Resource database was last updated
|
select ServerProperty('ResourceLastUpdateDateTime')
|
ProductLevel
|
Returns Level of the version of SQL Server instance
'RTM' = Original release version
'SPn' = Service pack version
'CTP', = Community Technology Preview version
|
select ServerProperty('ProductLevel')
|
No comments:
Post a Comment
Please leave a comment for this post