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 (https://blog.sqlauthority.com)

SQL Function, SQL Scripts
Previous Post
SQL SERVER – QUOTED_IDENTIFIER ON/OFF and ANSI_NULL ON/OFF Explanation
Next Post
SQL SERVER – Download 2005 SP2a

Related Posts

2 Comments. Leave new

  • Todd Senauskas
    May 6, 2010 8:04 pm

    This is fine but it does not provide the friendly 2000, 2005 etc version info. Any ideas on reporting a user friendly version number?

    Reply
  • 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

    Reply

Leave a Reply