3

A WSUS 3.0 SP2 Installation on a site I inherited has a huge database by now.

This site used to have several generations/variations of client/server Windows installations, and several thousands of approved updates for the <80 machines. Now all the machines have been updated/harmonized to 1 generation of Windows, and 2 Generations of Office (soon to be one).

I have edited the "Products and Classifications" and ran the "Server Cleanup Wizard every time an old generation/SP-Level was dropped. The Wizard each time deleted many files from the WSUSContent folder.

Now I am down to <700 approved updates, yet the WSUSContent folder and the database are still huge and slow. 11GiB+ and 5GiB+.

Can I, without having to reinstall WSUS and the updates for it, "clear" the database, delete all WSUSContent/*, and start fresh with 0 Approvals/PCs?

Most of the updates in the database have been rolled into updated installation files anyway, so I hope to end up with a much leaner/faster database without old logs about ancient updates.

I know about wsusutil reset, but this only "reset"s the WSUSContent, not the Database?

So, I think, my core question is: "How do get an untouched WSUS-DB for an existing installation"?

3
  • Here's a good article on cleanup through the GUI.I can't find anything conclusive about creating a new WSUS content DB from without reinstalling. Once the GUI cleanup is complete, connect to the DB with SSMS and check for the free space in the MDF and LDF files. You could then shrink those file and afterwards reindex the DB, etc.I assume you're familiar with some of this but if not I can find an article and send. Not sure how the SQL DB is setup in your environment though and what tools you use for manage it (e.g. SSMS, etc.?). community.spiceworks.com/how_to/2563-clean-your-wsus-server – Pimp Juice IT Nov 1 '15 at 13:55
  • When you purge records from a SQL database, the space from the OS perspective does not shrink, only the space within the file but unused space is reused until its out of space and perhaps has to regrow the file larger (OS perspective again) so this is why you'd have to shrink (MDF and LDF files) it you have a ton of free space available, but you'd want to reindex afterwards if you do shrink. – Pimp Juice IT Nov 1 '15 at 13:57
  • Added article on first comment reply forgot it... You have already done some or most of this but wanted to share. – Pimp Juice IT Nov 1 '15 at 14:00
1

No, there is no supported way of resetting to an "untouched" or clean WSUS database.

I see two options:

  1. Don't do anything beyond practices recommended by Microsoft. Which are everything the WSUS GUI offers and reindexing the database. Stop worrying about those extra couple of gigabytes you may free up. If five gigabytes is a problem, you should already have invested in more space in general. Running any server at it's capacity is a bad idea. Which places the "problem" at a entirely different place.

    With everything else you are jeopardizing the service's integrity and unnecessarily complicating the "problem". When getting to that point you have to consider option two anyway.

  2. If the only purpose of your WSUS installation is to is to save bandwidth, and you don't have a complicated set of rules for your update releases and distribution, reinstall WSUS.

    While reinstalling WSUS on a Small Business Server is not supported, doing so with a dedicated WSUS instance is extremely easy.

    Uninstall WSUS and WID roles and features, remove the WID database files and reinstall the whole thing. That will take about 2 hours of your time and a complete resync (bandwidth) and you are good to go.

    I recommend following the guidelines at the article Best Practices with Windows Server Update Services 3.0. Especially the point: "Make sure that your WSUS server is configured to download only approved updates"

2
  • I used this suggestion. The linked script needs the line "SET QUOTED_IDENTIFIER ON;" added near the top, line 3, or 4. It slims down the DB and makes it faster, but not not as much as hoped. Still: Voted Up, marked as answer. Thank you. – Alex Stragies Apr 19 '16 at 15:54
  • Hm yeah, databases in general don't benefit much from reducing and defragmenting the database file. They are build to write data in a way that already optimizes reads and writes. That is also why a database file does not shrink, if data is removed from it. :) – Daniel Apr 19 '16 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.