How get information about local server in SQL Server 2012?

Sometimes we must get information about our server. How to do it? I write about it in this post.

There are several configuration functions stored these information. First is @@SERVERNAME stored name of local server. It will be name of your computer.

SELECT @@SERVERNAME ;

E1

Another is @@SERVICENAME return name of your SQL Server.

SELECT @@SERVICENAME ;

e2

The @@VERSION return version your SQL Server.

SELECT @@VERSION ;

e4If You would like info about language in SQL Server, apply @@LANGUAGE function.

SELECT @@LANGUAGE ;

e5Another way to get these information is to apply metadata function: SERVERPROPERTY. This function get one argument – name of property.  Property Edition inform about edition your local server.

SELECT SERVERPROPERTY ( 'Edition' )

e6Property EngineEdition return more number of edition server.

SELECT SERVERPROPERTY ( 'EngineEdition' )

e7It is list of meaning this numbers:

1 = Personal or Desktop Engine (Not available in SQL Server 2005 and later versions.)
2 = Standard (This is returned for Standard, Web, and Business Intelligence.)
3 = Enterprise (This is returned for Evaluation, Developer, and both Enterprise editions.)
4 = Express (This is returned for Express, Express with Tools and Express with Advanced Services)
5 = SQL Database
6 - SQL Data Warehouse

Property InstanceName return name of instance SQL Server but for default instance return NULL.

SELECT SERVERPROPERTY ( 'InstanceName' )

e8MachineName or ServerName are properties for name of your computer with SQL Server. It is the same as @@SERVERNAME configuration function.

SELECT SERVERPROPERTY ( 'MachineName' )

E1
If You would like to get level and version SQL Server, htese information give You ProductVersion and ProductLevel properties.

SELECT SERVERPROPERTY ( 'ProductVersion' )  as ProductVersion,
            SERVERPROPERTY ( 'ProductLevel' )  as ProductLevel ;

e9