SERVERPROPERTY in SQL Server
First of all let me explain what is serverproperty in sql server. Serverproperty in sql server is built in system function. This system function is important because you get a lot of useful information regarding to your SQL Server.
This article will show you how to get all information you need about your SQL Server. For example you want to know the server name, instance name, server version or collation. By using serverproperty you can get all these useful information and a lot more. In the query below you will see a short list of properties.
Let’s see in example how SERVERPROPERTY function works. See the query below to get better understanding
SERVERPROPERTY('MachineName') as [Host (Computer)],
SERVERPROPERTY('InstanceName') as [Instance],
SERVERPROPERTY('Edition') as [Edition],
SERVERPROPERTY('ProductLevel') as [ProductLevel],
Case SERVERPROPERTY('IsClustered') when 1 then 'CLUSTERED' else
'STANDALONE' end as [ServerType],
SERVERPROPERTY('Collation') as [Collation],
SERVERPROPERTY('EngineEdition') as [Engine Edition],
SERVERPROPERTY('LicenseType') as [License Type]
These are some of the properties that SERVERPROPERTY has. To see all properties of SERVERPROPERTY function click to the link below.