SQL-Server: Get Server – Edition – Instance Name with T-SQL

Bschelst/ March 29, 2017/ SQL-Server/ 0 comments


The following t-sql statement returns the server name, server instance, instance, edition & version of the running SQL-Server.


 SELECT             SERVERPROPERTY('MachineName') AS [ServerName],  			SERVERPROPERTY('ServerName') AS [ServerInstanceName],              SERVERPROPERTY('InstanceName') AS [Instance],              SERVERPROPERTY('Edition') AS [Edition],             SERVERPROPERTY('ProductVersion') AS [ProductVersion],  			Left(@@Version, Charindex('-', @@version) - 2) As VersionName
Share this Post

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>