Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2003
    Posts
    47

    Unanswered: Service Pack & SQL Server

    The last SP applied to SQL Server is the one given weh :

    select @@version

    is launched

    (or it is related to OS SP).

    Thanks

  2. #2
    Join Date
    Jan 2003
    Location
    India
    Posts
    523
    Quote Originally Posted by ENNAIFAR
    The last SP applied to SQL Server is the one given weh :

    select @@version

    is launched

    (or it is related to OS SP).

    Thanks
    yes @@version Returns the date, version for the current installation of Microsoft SQL Server

  3. #3
    Join Date
    Jan 2003
    Location
    India
    Posts
    523
    for more information on it check out this article

  4. #4
    Join Date
    Oct 2003
    Posts
    47
    So if I have the following result (for select @@version)

    Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
    Dec 17 2002 14:22:05
    Copyright (c) 1988-2003 Microsoft Corporation
    Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 3)

    I can Assume that SP 3 is applied to my SQL Server

  5. #5
    Join Date
    Jan 2003
    Location
    India
    Posts
    523
    Quote Originally Posted by ENNAIFAR
    So if I have the following result (for select @@version)


    I can Assume that SP 3 is applied to my SQL Server
    Yes.

    here is other way to get the sp level

    SELECT SERVERPROPERTY('ProductLevel')

  6. #6
    Join Date
    Nov 2003
    Posts
    68

    You can do that

    SET NOCOUNT ON
    SELECT CONVERT(CHAR(25),@@SERVERNAME) AS 'SQL SERVER',
    SUBSTRING(@@VERSION,23,4) AS 'PRODUCT VERSION',
    SUBSTRING(@@VERSION,35,3) AS 'BUILD NUMBER',
    CASE SUBSTRING(@@VERSION,35, 3)
    -- 6.5
    -- 2000
    WHEN '194' THEN 'NO SP'
    WHEN '384' THEN 'SP1'
    WHEN '534' THEN 'SP2'
    WHEN '760' THEN 'SP3'

    ELSE 'Unknown - may be a Hot-Fix version or script out of date'
    END AS 'SERVICE PACK'
    set nocount off

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •