Link to home
Start Free TrialLog in
Avatar of KK Reddy
KK ReddyFlag for United States of America

asked on

How to find latest Service Pack applied date in SQL Server

Hello EE Team,

I would like to capture latest SQL Server Service Pack / CU applied date using T-SQL, not sure if I can find this info in Registry, can I get any help on that ?



Avatar of oBdA

Select @@version

Open in new window

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

Open in new window

Determine the version, edition, and update level of SQL Server and its components
I am not sure you can locate it via tsql, you could look through the windows installation of updates.
look at the first few lines of the Errorlog file for that instance. By default, the error log is located at Program Files\Microsoft SQL Server\MSSQL.n\MSSQL\LOG\ERRORLOG and ERRORLOG.n files. The entries may resemble the following:

2011-03-27 22:31:33.50 Server Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64)  
March 29 2009 10:11:52  
Copyright (c) 1988-2008 Microsoft Corporation  
Express Edition (64-bit)  
on Windows NT 6.1 <X64> (Build 7600: )
Avatar of KK Reddy


Thanks Partha & Arnold.

I couldn't find the info in Error log, it shows when was the last time Microsoft updated the version but not in our environment.
I found the last updated time in Summary.txt file (Overall Summary -  End Time) which is under Setup Bootstrap folder, is there anyway we can capture this info using T-SQL or Powershell ?
or can we find this info anywhere in Registry ?
Avatar of oBdA

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial