SQL SERVER – Script to Determine Which Version of SQL Server 2000-2005 is Running

To determine which version of SQL Server 2000/2005 is running, connect to SQL Server 2000/2005 by using Query Analyzer, and then run the following code:

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

The results are:
The product version (for example, 8.00.534).
The product level (for example, “RTM” or “SP2″).
The edition (for example, “Standard Edition”).

For example, the result looks similar to:
8.00.534 RTM Standard Edition

Reference : Pinal Dave (http://blog.SQLAuthority.com)

2 thoughts on “SQL SERVER – Script to Determine Which Version of SQL Server 2000-2005 is Running

  1. Why can there be a difference between @@version and serverproperty command? Which is more reliable…
    For e.g @@version is stating SP2 and productlevel is stating RTM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s