WSUS repair after backup restoration

Last week during the process of updating a few services one of the WSUS servers had gone belly up. Installing over the top or performing an uninstall then a re-install did not clear up the issue. The next step was to perform a restore on the system (dedicated WSUS/Forefront for Exchange VM) from the last backup taken before the system started going south. The restore worked bringing back a WSUS instance which would talk to the clients without any issues but then I started seeing errors in the application event log. The errors were showing that recently approved updates which were in the database could not be found on the filesystem.

What I ran into was a catch-22 when performing an enterprise deployment of WSUS where the SQL instance is on another VM separate from the WSUS server. Restoring the SQL database is possible but it may or may not be exactly when the backup of the WSUS instance was so I opted the other option which allows for the existing database to remain intact.

1) Stop the “Update Services” and two IIS services
2) Delete everything found in the WsusContent folder, while it can be skipped I wanted to make sure everything was cleanly downloaded
3) Open up a command line
4) cd “\Program Files\Update Services\Tools
5) wsusutil.exe reset

This will issue a full verification of the WSUS installation and pull down all of the approved updates. Which at this point the 30GB or so of updates took a few hours to rebuild the entire local cache. At which time, updates began to flow normally.

, , , , ,
August 24, 2012 at 9:42 am Comments (0)

WSUS Syncronization logging

When working with a WSUS console if you ever need to look at the Syncronizations it takes a long time to load. This is due to the way the logging functionality was designed which over months or years can cause this pain to minutes to load in some environment. However, this data can be cleaned to provide much faster load times.

If you want to purge the entire Syncronization history:

DELETE FROM tbEventInstance WHERE EventNamespaceID = '2' AND EVENTID IN ('381', '382', '384', '386', '387', '389');

Otherwise if you want to keep the more recent records you could do something like the following:

DELETE FROM tbEventInstance WHERE EventNamespaceID = '2' AND EVENTID IN ('381', '382', '384', '386', '387', '389') AND DATEDIFF(month, TimeAtServer, CURRENT_TIMESTAMP) >= 2;
June 4, 2012 at 11:21 am Comments (0)

Windows Internal Database

During the install WSUS under Server 2003 or as an optional component to be installed under Server 2008/R2 there is an option to use the “Windows Internal Database”. This database is based upon a stripped down version of SQL Server 2005 Express with three exceptions. First there is no database size limitations, any management of the database needs to be done locally either via command line or SQL Management Studio, and lastly there are no licensing restrictions (Moving to SQL Server Standard or higher requires SQL Client CALs or per-socket licensing in which both cost significantly more).

By default upon installation any databases will be installed under “C:\WINDOWS\SYSMSI\SSEE\MSSQL.2005\MSSQL\Data” as you may wish to adjust your antivirus scanning for this particular folder.

In the event you wish to manage the internal database via SQL Management Studio login to the server with administrative privileges with a server name of \\.\pipe\mssql$microsoft##ssee\sql\query while using Windows Authentication.

, , , , ,
December 1, 2011 at 2:18 pm Comments (0)