@@Version and ServerProperty return different service packs

  • Hi

    I'm a bit puzzled.  Using @@version QA tells me that the server is at SP4, but, SERVERPROPERTY ('productlevel') returns SP3, this is on a SQL 2000 box.

    Any thoughts?

  • These come from different places and they can get out of synch. I think one is the registry and one if the file information.

  • Many thanks, any thoughts on which one to rely on and/or how to get them back into sync?

  • What DID both of them return? Also, how many instances do you have on the server?

    -SQLBill

  • Check the version on sqlservr.exe at the file system. That tells you the version of the engine. In rare cases versions can get out of synch, especially if there was a hotfix applied or the like.

     

    K. Brian Kelley
    @kbriankelley

  • I agree about the point the difference, if there is, hardly comes from out of sync. I do not mean it never happen. Anyhow, applying a hot fix should not change the version of service pack, I believe. I will greatly appreciate if the original question raiser could describe what (s)he found in more detail.

  • JIC... are you sure you're not looking at the build information at the end of the @@version that applies to the version of the OS, not the version of SQL Server?

    To illustrate: I have one machine with SQLServer 2000 and 2005 instances on it. SERVERPROPERTY ('productlevel') will of course return different things for these two instances.  However, @@Version for both returns a string that ends in the following:

    [different SQL Server information here for each]  ... on Windows NT 5.1 (Build 2600: Service Pack 2)

    ... the item in bold will be identical on each and thus obviously bears no relationship to each sql server instance or its build/version.  Could this possibly be what you're seeing?

    >L<

  • If you want to check Service pack level of SQL Sever "Select @@version" is the proper command.

    {                                                                                                                                                                                                                                                                                                         

    Microsoft SQL Server  2000 - 8.00.2191 (Intel X86)

     Dec  9 2004 23:00:00

     Copyright (c) 1988-2003 Microsoft Corporation

     Developer Edition on Windows NT 6.0 (Build 5600: )

    }

    8.00.2191 << This will tell the vesion and patch level of SQL Server.

    NOT ... Windows NT 6.0 (Build 5600: ) <<--- This is OS Info

     

  • The @@version will always tell the Service pack of the OS installed on the machine. To verify, you can go to the Enterprise Manager and right click on the instance name -> properties -> general. Here you will find the same service pack info with OS as you find with @@version.

    To check the SQL Server service pack information, use SERVERPROPERTY('ProductLevel').

    Hope this clarifies.

    Best Regards

    Pankaj Khanna
    Database Administrator - SQL Server 2000

    Keep hope to keep you intact...

  • Thanks for all the advice, it looks as though the OS was up'd to SP4, but SQL has remained at SP3/3A.  I am getting anecdotal reports that the previous DBA installed SQL SP4; this is apparently not the case.

     

     

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply