Discovering SharePoint installed updates

It’s a long time I wonder how to discover the list of installed updates in a SharePoint farm. Unfortunately not all updates are listed in the server’s control panel “view installed updates” page. This is bad because more than once it happened that I had to scale out a farm and there was no documentation at all.

I spent some time searching for how to get this list using Windows Powershell, but all I found out is that it seems that is not possible to get it (or no one did this before – or I did not search using the right keywords :)). I found lot of scripts but none of them did what I was looking for, the list of CU’s and hotfix installed on the farm.

Browsing the “Manage Patch Status” page in Central Administration I can get something close to what I need, so I started the Developer Dashboard and I noticed that the page loads a stored procedure called proc_GetProductVersions that sounds interesting.

Get Product Version

In the ULS logs I also noticed that this stored procedure is executed against the Configuration Database.

Get Product Version ULS

Then I did something that you should never do in a real scenario, I opened SQL Server Management Studio and I run some query against the configuration database. This is my demo/lab  VM, please don’t try this at home, at work, anywhere else, just like WWE says.

I opened the stored procedure in Query Editor and I noticed that it execute a select (SELECT *, with respect to performance :)) from the table ServerVersionInformation. At this point I was excited as a child with the hands in the cookie jar, but I’ve been quite disappointed when I realized that this table contains the same data that we can find in Central Administration. The only difference is that I can running a select like the following we get only one row per update:

T-SQL Result

Using either Version number or Patch Url you can easily get the installed updates. You can get help using Todd Klindt‘s or Steve Chen‘s cheat sheet.

I do not think this is a good way to follow and I discourage everybody to follow it, but I liked digging inside DBs and searching a way to get the list of installed updates. So, what else I can say? Nothing about underline how much is to document all updates in your farm (and make your consultant happy when they’ll work with you).

– Riccardo

Posted by Riccardo

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.