Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Verify service pack

Status
Not open for further replies.

Maii

Programmer
Aug 28, 2003
54
BD
hi there,
Is there any way to verify which service pack installed in SQL 2000 server?
thanks in advance
maii
 
Few Ways

Code:
CREATE FUNCTION ServicePackversion ()
RETURNS varchar(255) AS 


    BEGIN 
    DECLARE @Ver varchar( 255 )  
    SELECT @Ver=case 
    WHEN CHARINDEX ('8.00.1',@@version)>0 THEN 'Release'
    WHEN CHARINDEX ('8.00.3',@@version)>0 THEN 'SP1'
    WHEN CHARINDEX ('8.00.5',@@version)>0 THEN 'SP2'
    WHEN CHARINDEX ('8.00.760',@@version)>0 THEN 'SP3'
    ELSE 'unknown' 
end
RETURN (@Ver) 
END

select dbo.ServicePackversion ()

select @@Version

select charindex('8.00.760',@@version)

[bandito] [blue]DBomrrsm[/blue] [bandito]
 
You could just go to enterprise manager, right click on the server & select properties
 
This will give you the service pack info and version info for your install.
Code:
SELECT 'SQL Server '
+ CAST(SERVERPROPERTY('productversion') AS VARCHAR) + ' - '
+ CAST(SERVERPROPERTY('productlevel') AS VARCHAR) + ' ('
+ CAST(SERVERPROPERTY('edition') AS VARCHAR) + ')'

Denny

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(My very old site)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top