Finding out version and edition of a Microsoft SQL Server

The other day at a customers I needed to find out the version and edition of an installed SQL server… Here is the solution:

Connect to an instance of SQL Server by using the following sqlcmd command:

sqlcmd -S ServerInstance

Where Server is the name of the computer and Instance is the name of the instance you want to check. If you have used the default named instance during setup, specify the instance as “SQLExpress”.

To identify the server name and instance name, type the following command:

select @@servername
go

When connected, type the following two commands:

select @@version
go

Alternatively, you can type the following two commands:

select serverproperty(‘edition’)
go

The sqlcmd tool displays the version information. If the last line of information includes “Express Edition,” the instance to which you are connecting is running SQL Server Express.

Thanks Anders…

Links

http://msdn.microsoft.com/en-us/library/ms165662(SQL.90).aspx

Leave a Reply