SQL Patching implementation date

  • Hi

    I am looking at the script to get SQL Patching implementation date .

    Any script that I can execute using SSMS ?

    Thanks

    Your feedback is much appreciated

     

     

  • Only way I know is to write some powershell to look in C:\Program Files\Microsoft SQL Server\<version>\Setup Bootstrap\Log\<date>\Summary_<somestring>.txt

    Where <version> is 80/90/100/110/120/130/140/150 etc based on the version of SQL you have installed.

    Where <date> is the time it was patched, you will need to find and build the string dynamically based on "get-childobject" or similar

    Where <somestring> is again the Server and DateTime is was patched, again you will need to find and build this dynamically.

    eg C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20170707_202354\Summary_MYSERVER_20170707_202354.txt

    Once you have the text file look for "Requested action:" if the value is "Patch" you know you had a patch installed.  If you want the before and after versions look for PatchLevel (after) and ProductVersion (before), if you want success find the Exit message

  • Thank you . I will try it

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply