Friday, 24 February 2012

.Net Beginners : Get SQL server version details using SQL Commands

Following command get full SQL server version details:

Command :
    select @@VERSION

Output :
Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)   Oct 14 2005 00:33:37   Copyright (c) 1988-2005 Microsoft Corporation  Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

To get specific information of server following commands:
Command :
    SELECT SERVERPROPERTY ('productversion') as product_version

Output :
    9.00.1399.06

Command :
    SELECT SERVERPROPERTY ('productlevel') as product_level

Output :
    RTM


Command :
    SELECT SERVERPROPERTY ('edition') as edition

Output :
   Enterprise Edition

4 comments:

  1. Hi Kunal,
    Now I give Output details, so check again.

    ReplyDelete
  2. run this command in SQL Server Management studio

    xp_msver

    ReplyDelete
    Replies
    1. Thanks for your valuable comment.
      Can you provide details like which version of sql server support this command and other details.

      Delete