determine sql server patch level via script

Posted on 2006-03-21
Last Modified: 2012-06-21

via sql server query analyzer how can I using a script determine the version of patch level sql server is on?

Question by:rutgermons
    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
    Hi rutgermons,
    if you are looking for the SP then
    select @@version will help you

    LVL 75

    Expert Comment

    by:Aneesh Retnakaran
     No SP
    (RTM or Golden) SP1 SP2 SP3 / SP3a SP4 SP5 SP5a
    SQL Server 6.0 6.00.121 6.00.124 6.00.139 6.00.151        
    SQL Server 6.5
    (Hydra) 6.50.201 6.50.213 6.50.240 6.50.258 6.50.281 6.50.415 6.50.416  
    SQL Server 7.0
    (Sphinx) 7.00.623 7.00.699 7.00.842  7.00.961 7.00.1063    
    Use this
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    a more precise option:
    select serverproperty('Edition') as [Edition]
      ,serverproperty('Engine Edition') as [Engine]
      ,serverproperty('Product Version') as [Version]
      ,serverproperty('Product Level') as [Level]

    Author Comment

    it gives me only Edition as an output i.e Enterprize Edition

    the rest null,could you pls be as kind as to advise

    LVL 142

    Accepted Solution

    seems the documentation has a bug, there are no spaces in the strings:

    select serverproperty('Edition') as [Edition]
      ,serverproperty('EngineEdition') as [Engine]
      ,serverproperty('ProductVersion') as [Version]
      ,serverproperty('ProductLevel') as [Level]

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
    Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now