Database Engine

How can I find out what SQL Server version is running?

I was asked by someone which SQL Server version a server was running and was surprised when my DBA colleague said to run a stored procedure I had never heard of.  I had not thought that there would be more than one way as the usual method I used below was so simple I didn’t think that there would be a need for another method.  I then did a deep dive of all the different ways I could find out the version of SQL Server I was running and have included them below.

Method 1

Go to Help > About

1

Method 2

Use the following script .

SELECT @@VERSION

2

That is the script which I would use and I think is pretty much the most commonly used method within the SQL Server community.

Method 3

EXEC sp_MSgetversion

3

Method 4

EXEC xp_msver

4

Method 5

SELECT SERVERPROPERTY(‘productversion‘), SERVERPROPERTY (‘productlevel‘), SERVERPROPERTY (‘edition‘)

5

Method 6

Within the SQL logs the current version will be listed when the log was last cycled.

6

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.