WSUS 3.0 SP2 Database is huge, can I "reset" it, or what else can I do?

6,128

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"

Share:
6,128

Related videos on Youtube

Alex Stragies
Author by

Alex Stragies

Information Technology Specialist by Day, Science Enthusiast with too many areas of interest for a lifetime. In I.T. my main areas of interest are networking, virtualization, voIP, debian servers, etc. Everyday I become better at using my favorite tools; bash, vim, tmux, sed, and graphviz. Also thanks to SE. Heres my attempt at returning the favor. I feel I can contribute to the SE Language Sites, because I use English, German, and French daily and extensively. I am currently attempting to find some time to learn another latin-based language, most likely Spanish, but Italian is also still in the running. I have picked up comprehension skills in both during my travels, thanks to 5 years of latin in school, and 20+ years of exposure to French.

Updated on September 18, 2022

Comments

  • Alex Stragies
    Alex Stragies almost 2 years

    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"?

    • Pimp Juice IT
      Pimp Juice IT over 8 years
      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
      Pimp Juice IT over 8 years
      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
      Pimp Juice IT over 8 years
      Added article on first comment reply forgot it... You have already done some or most of this but wanted to share.
  • Alex Stragies
    Alex Stragies about 8 years
    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.
  • Daniel
    Daniel about 8 years
    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. :)