How will I check if SQL Server 2005 SP2 is installed?
How to tell if SQL 2005 SP2 is installed?
To see if SQL 2005 Service Pack 2 is installed execute the following command:
Select @@version
This query should come up with something like this:
Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
2005 - 9.00.3042.00 means it has SP2 installed
Here is a list of values for other version and service packs
| Release | Sqlservr.exe |
| RTM | 2005.90.1399 |
| SQL Server 2005 Service Pack 1 | 2005.90.2047 |
| SQL Server 2005 Service Pack 2 | 2005.90.3042 |
| SQL Server 2005 Service Pack 3 | 2005.90.4035 |
| Release | Sqlservr.exe |
|---|---|
| RTM | 2000.80.194.0 |
| SQL Server 2000 SP1 | 2000.80.384.0 |
| SQL Server 2000 SP2 | 2000.80.534.0 |
| SQL Server 2000 SP3 | 2000.80.760.0 |
| SQL Server 2000 SP3a | 2000.80.760.0 |
| SQL Server 2000 SP4 | 2000.8.00.2039 |
Another Script for SQL Version
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')