We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

determine sql server patch level via script

rutgermons
rutgermons asked
on
Medium Priority
1,320 Views
Last Modified: 2012-06-21
folks

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

roger
Comment
Watch Question

AneeshDatabase Consultant
CERTIFIED EXPERT
Top Expert 2009

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

Cheers!
AneeshDatabase Consultant
CERTIFIED EXPERT
Top Expert 2009

Commented:
 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
http://vyaskn.tripod.com/sqlsps.htm
Guy Hengel [angelIII / a3]Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009

Commented:
a more precise option:
http://msdn.microsoft.com/library/en-us/tsqlref/ts_sa-ses_3mi1.asp?frame=true
select serverproperty('Edition') as [Edition]
  ,serverproperty('Engine Edition') as [Engine]
  ,serverproperty('Product Version') as [Version]
  ,serverproperty('Product Level') as [Level]

Author

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

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

r
Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009
Commented:
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]

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.