WSUS Hangs on "Unused updates and update revisions"

In our environment we have not cleaned up WSUS updates in a while, probably about a year. I have been tasked with cleaning it up and optimizing it. When I attempt to run the WSUS Server Cleanup Wizard, it hangs on "Unused updates and update revisions"
and doesn't do anything. The wizard then disappears and I am taken back to the WSUS Console where I see the following:
Error: Database Error
When I click copy error to clipboard, this is what is copied:
The WSUS administration console was unable to connect to the WSUS Server Database.
Verify that SQL server is running on the WSUS Server. If the problem persists, try restarting SQL.
System.Data.SqlClient.SqlException -- Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Source
.Net SqlClient Data Provider
Stack Trace:
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at Microsoft.UpdateServices.UI.SnapIn.Wizards.ServerCleanup.ServerCleanupWizard.OnCleanupComplete(Object sender, PerformCleanupCompletedEventArgs e)
In my research, I have found several solutions, and have tried a few of my own. Below I will list the ones I have tried: 
1. Run each item individually. IE, run superseded updates, then run expired updates after that finishes, then run unneeded update files after that finishes, etc. This did not work
2. Stop the WSUS IIS service and run "wsusutil.exe removeunneededupdates" this also did not work
The solutions I have found, but am hesitant to try (due to the fact that we are in a live production environment) are the following:
1. Re-Index the WSUS Database according to the following link: 
https://technet.microsoft.com/en-us/library/dd939795(v=ws.10).aspx
2. Deleting the files in the WSUS folder and running "wsusutil.exe reset" from the following link: 
http://windowsitpro.com/windows/quick-tip-resetting-wsus-server
I would like to know what, if any, impact either of these solutions will have on our environment, and which one would be the preferred method. I feel like I should use the first one, and if I still don't have any luck then try the second. My only concern
with the second method is that it might break something (not sure what, except updates). 
A little about our environment - 8,000 computers, WSUS and SCCM are on the same Server 2008 R2 server, we only have the one WSUS and SCCM server, so nothing downstream as far as WSUS is concerned. 
Thanks everyone!

UPDATE:
I have started going through and declining updates, and then going through SCCM and removing any expired updates from the SCCM side as well. I am now down to 3822 unapproved updates in WSUS, with a total of 13304 updates.
At this point I am STILL UNABLE to run the cleanup wizard to clean up any of these. It still hangs when it runs, and only on Unused Updates and update revisions. I have even tried running powershell scripts and command line utilities to clean WSUS up, and
still just hangs. I am pretty much at a loss, so any other advice would be appreciated.
One more question, should it resort to this: What impact does resetting WSUS have on a live environment, with 7000 plus computers? Should I have to resort to it, is this something that is going to cause any major issues? 
We do plan on preventing this in the future by running the database defrag once a month, and running the WSUS Server Cleanup Wizard once per quarter, but getting there sure is proving to be quite the challenge.
Thanks again!

Similar Messages

  • WSUS hangs on Cleanup wizard for Unused Updates, then disconnects from console.

    I am running WSUS 3.0 SP1 on Windows 2003 and recently have found that running the Cleanup Wizard works with all of the selectable options except the "Unused Updates" option. It hangs about 1\2 way through and then disconnects from the console. Up until now it has worked.
    I am using the Windows Internal Database and the size of the MDF is 3193024kb.
    Everything other than this wizard is working fine. Please help.

    It does not run much better when written without a CURSOR. I modified it to use a WHILE loop and it deletes about 1 per minute here which is the same as the old code with a CURSOR.
    Not surprised. To be frank, using a WHILE LOOP just turns it into a manual CURSOR, making it no better off than using the CURSOR construct in T-SQL. The correct approach here is to write the code with a SET-BASED approach. Unfortunately, as you're about
    to see.. sometimes there are scenarios just too complex to do with a set-based approach.
    In order to use the set-based approach, you'll need to take the code from spDeleteUpdate and modify it to join directly to the table of GUIDs to delete. Execute the whole thing in *one* DELETE statement.
    Of course, part of the other problem that contributes to the performance issues is that spDeleteUpdate *ALSO* uses CURSORs.... <sigh>, and a subprocedure. spDeleteUpdate retrieves a list of RevisionIDs, and then calls spDeleteRevision for each of those
    RevisionIDs. (And as we've already seen, some updates may have a large number of RevisionIDs.) spDeleteRevision is where the real work is done.
    At the crux of that proc, are deletes from these tables:
    dbo.tbEventInstance (this will be a time killer as well, depending on how many clients affected a given update, and how much activity surrounded that update)
    dbo.tbDeployment
    dbo.tbUpdateStatusPerComputer
    dbo.tbProperty
    dbo.tbFlattendedRevisionInCategory
    dbo.tbRevisionInCategory
    dbo.tbRevisionLanguage
    dbo.tbMoreInfoURLForRevision
    dbo.tbSecurityBulletinForRevision
    dbo.tbKBArticleForRevision
    dbo.tbBundleDependency
    dbo.tbBundleAtLeastOne
    dbo.tbBundleAll
    dbo.tbPrerequisiteDependency
    dbo.tbInstalledUpdateSufficientForPrerequisite
    dbo.tbPrerequisite
    And all of the associated transaction wrappers and error checking for each and every deleted row from each of those tables to ensure continued data integrity in the database.
    So while the code above making a simple call to spDeleteUpdate looks quite simple on the surface... underneath the covers there's a LOT of activity going on to make that one update get deleted.
    If you wanted to speed it up... you'd need to use spGetObsoleteUpdatestoCleanup to get a list of UpdateIDs, then build a list of RevisionIDs from that, and then join that temp table of RevisionIDs to each of the -15- tables above, and delete from all -15-
    tables simultaneously. Which would force all of those deleted records into a SINGLE transaction, and probably whatever gains you got from switching from procedural logic to set-based logic would be lost in the massive overhead of managing a transaction of
    that size.
    A possible compromise would be to execute a set-based DELETE by UpdateID, so you'd capture the RevisionIDs for a given UpdateID, and then delete across all -15- tables for that short list of RevisionIDs (except where that list ain't so short). But still,
    this compromise might well speed things up, as the loop for UpdateIDs is likely only measured in the hundreds, where as the loop through all RevisionIDs is sometimes measured in the thousands or tens of thousands (depending on if/when the server was last purged).
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • Am facing issue on my iphone 5s after updating to ios 7.1.1, every while the phone hang after lock it and cannot unlock and even cannot turn on the screen this is so annoying, kindly advice if i have to go back to the store as device still under warranty

    Am facing issue on my iphone 5s after updating to ios 7.1.1, every while the phone hang after lock it and cannot unlock and even cannot turn on the screen this is so annoying, kindly advice if i have to go back to the store as device still under warranty, and if its a hardware issue or software ??

    Hello HaithamOkeely,
    We've an article that provides the following troubleshooting steps that may help stabilize your iPhone.
    If the device is unresponsive or if certain controls aren't working as expected, restart your device.
    If the device remains unresponsive or does not turn on (or power on), reset your device.
    If there is no video or if the screen remains black, verify that the device has enough charge to turn on:
    If you are using an iPad, ensure that it's connected to the USB Power Adapter supplied with the device.
    Let it charge for at least twenty minutes, then see if it starts normally.
    If there is no image on the screen, press the Sleep/Wake button to attempt to wake the device.
    If the screen displays a red battery icon, continue charging the device until the battery is fully charged. Learn more about charging iPhone and iPod touch, or iPad.
    If the above steps do not resolve the issue, or the if the screen remains black or shows a persistent Apple logo, try restoring with iTunes:
    Connect the device to your computer and open iTunes.
    If the device appears in iTunes, select and click Restore on the Summary pane. Learn more aboutrestoring iOS software.
    If the device doesn't appear in iTunes, try to force the device into recovery mode, and then restore it.
    If the above steps do not resolve the issue, contact Apple.
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    Cheers,
    Allen

  • We use a doc template to create a purchased part spec document and then save them as pdf formatted files.  These part spec documents are also appended with the datasheets for these purchased parts.  When we want to update/revise the document, is there a m

    We use a doc template to create a purchased part spec document and then save them as pdf formatted files.  These part spec documents are also appended with the datasheets for these purchased parts.  When we want to update/revise the document, is there a method, using Acrobat, to make those updates to the pdf, or must we go back to the doc template and basically generate a new document?
    Also, our resulting pdf documents aren't searchable.  How can we generate pdf documents that are searchable?  I may want to search for a part value or name within the body of these pdf documents, but currently can't do that...very inconvenient.
    Can you assist?

    Not totally sure about the search issue. A lot depends on how you created the PDF and what is in the datasheets you attached (like are they graphics?). The doc portion should be searchable as long as you used print to the Adobe PDF printer or PDF Maker. For your use, it may be that the print is adequate. However, the result should be searchable (unless maybe you had a form with filled in fields and created the PDF with PDF Maker. I think the form data may be retained in form fields and the fields are not searchable. In that case, a print might be a better procedure. (it would help to know the versions of WORD and Acrobat as well as the exact process you used to create the PDF.)
    If the appended data sheets do not change, then you might try opening the original PDF and then using Replace Pages to replace the file created from the DOC file.

  • [SCCM 2012 R2] How SCCM 2012 handles Software Update Revisions?

    Hi All,
    There are a lot of questions regarding how SCCM 2012 handles Software Update Revisions.
    Does anyone know what happened if:
    Windows update publish some update with revision #1
    Same update downloaded and deployed via SCCM 2012
    Windows update publish same update with revision #2 or any newer revision
    What is happening with SCCM and already deployed and downloaded revision? How should I know what revision is really on my distribution points?
    Thank you in advance.
    Regards,

    In WSUS Revision History is very simple:
    Where I can find revision history in SCCM??? (please do not mention dates):
    Possible scenario in SCCM:
    Windows update publish revision #1 for one update
    SCCM Download and Deploy same update and revision #1
    Windows update change revision to #2
    What SCCM does after this scenario?
    Auto update Distribution Points with new revision of already deployed and downloaded update?
    Clearly state in SCCM Console that there is new revision of already deployed and downloaded update and waiting for admin to act?
    Just update the revision in SCCM Console and leave old revision od Distribution Points?????

  • Windows 8.1 hangs in Windows Update trying to get driver

    We have added a Surface Pro 3 running 64 bit Win 8.1 to our home network.  Our desktop running XP has an HP LaserJet 1200 printer attached via USB and it is shared. Our notebook running XP has no problem printing to the LaseJet 1200. On the Surface when trying to add the printer Win 8.1 finds the LaserJet 1200 and invokes Windows Update, presumably to download a 64 bit driver for the printer. Windows Update hangs, that is runs and does not stop. We've let it run for nearly an hour before ending it. I've looked at the HP site for drivers and it seems to imply that Windows Update is the correct way to get th driver we need. Is there another way to do this?

    Hello oldrah,
    Welcome to the HP Forums.
    To get your issue more exposure I would suggest posting it in the commercial forums since this is a commercial product. You can do this at Commercial Forums.
    Thanks for your time.
    Cheers,  
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • HP Pavilion Windows 7 hanging on installing updates

    Desktop totally hung trying in install update 2 of 6. I let my pc restart for new updates but after downloading updates and system restart my pc is now hung installing updates. I can not get out of this situation. After hard power off and when I press F8 all that comes up is the Startup Menu. I do not see the option to boot in Safe Mode. When I exit the Startup Menu Windows resumes but then seconds later the screen shows installing update 2 of 6 appears again. It seems to be accessing the hard drive as the light continues to flash. After a few minutes the light stops flashing except for occasionally. Anyone have any ideas? Thanks!

    Update. Checked my October this morning and it was hanging in Shutdown mode. I waited a couple hours and decided to force a shutdown/power off. It seems to have passed where it had been hanging for 2 days and Windows started successfully. Running a full system virus scan now. So things appear to be improving.

  • WSUS server dowloads the updates from microsoft without BUILT IN (MSRC ) number

    Hi,
           WSUS server downloads the update from microsoft with out MSRC NUMBER and its shows unspecified, as per my knowledge all the hotfixes must have the BUILT number can you please clearify
    me on this..?
    Thanks
    Balaji K 

    Hi,
           WSUS server downloads the update from microsoft with out MSRC NUMBER and its shows unspecified, as per my knowledge all the hotfixes must have the BUILT number can you please clearify
    me on this..?
    Thanks
    Balaji K 
    Only *Security Updates* have MSRC Security Bulletin numbers, but not all security updates have MSRC Security Bulletins associated with them. In fact, there are a large number of security updates that are not associated with security bulletins. -242- of 'em
    on my WSUS server.
    Otherwise, the MSRC Number field will always be blank on non-security updates, and may be blank on security updates.
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • HT201210 I have 4s facing hang problem after updating when i dicline the call the keypad geting locked ,touch stop working unable to unlock the phone .then what i can do i restart the phone with pressing home key & power key together then i am able to ace

    I have 4s with 16GB storage capacity using IOS 7.1.2.
    Facing hang problem after updating when i decline the call the keypad getting locked ,touch stop working unable to unlock the phone .
    Then what i can do i restart the phone with pressing home key & power key together then i am able to access it.
    Kindly resolve the issue as soon as possible
    Ashish
    [email protected]

    Did you already try to set it up as a new device, as explained in this article?
    iOS: How to back up your data and set up your device as a new device

  • Windows 2k3 - wsus continues to claim update needed despite being installed

    I'm having an issue with my Windows 2003 servers detecting an installed update.  I've installed the update and can verify it was installed from the "Review your update history" page
    on the Windows Update site.  
    We are using a WSUS server to deploy updates.  The WSUS server continues to report that I need to install this update.  Any ideas?

    Hi,
    Does this client reports properly? Please check the report of this client in the WSUS administration console.
    If the report is correct, could you provide the detailed name of the update? It may give some hints.
    Best Regards.
    Steven Lee
    TechNet Community Support

  • Apple every day is looking more alike Microsoft leaving the loyal costumers hanging by not updating EFI so 2006 inte macpro can run mountain Lion

    Apple every day is looking more alike Microsoft leaving the loyal costumers hanging by not updating EFI so 2006 inte macpro can run mountain Lion

    Greetings,
    The EFI is not why a 2006 MACPro cannot run ML, the thing is almost an antique, when you consider how fast things move in the tech world.
    No one says that you have to update to ML - I still have a G4 running plain old Leopard, and it works for me for what I need it for. I have several Macs (7) of all ages, and only three of them can run ML, but only two of them ever will, until I buy a new one.
    If ML is that important to you, then it's time to upgrade - normal upgrade paths for over 90% of us is three, to four years, max, to keep up with the latest and greatest. Its Ok to keep th eolder machines for th eusual run of the mill activities, like email, surfing the web, playing music, the odd video, etc.
    Cheers,
    M.

  • Apps hanging up on update stuck in wait mode on desktop iPad mini

    Apps hanging up on update stuck in wait mode on desktop iPad mini

    All of these suggestions have worked for other users in the past, try them in order and maybe one will work for you.
    "Waiting apps"
    1. Tap the "waiting" icon and see if you can pause it. If it does pause, then tap it again and see if it will resume. If that works, repeat the same steps for each "waiting" icon.
    2. Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    3. Make sure that you do not have a stalled download in iTunes - if you have a download in there that did not finish, complete that one first.
    4. If that doesn't work - sign out of your account, restart the iPad and then sign in again.
    Settings>iTunes & App Store>Apple ID. Tap your ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Go back to Settings>iTunes & App Store>Sign in and then try to update again. Tap one waiting icon only if necessary to start the download stream.
    5. You can also try deleting the waiting icons - tap and hold down on an icon until it wiggles - the tap the X on the icon to delete it. Then try to download again. Apps may also be able to be deleted in Settings>General>Usage>Storage if you cannot get the X to pop up on the icon.
    6. You can try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered.
    7. If all else fails, download the updates or the apps in iTunes on your computer and then sync the content to your iPad.

  • HT4623 Why does my i4s, ios6.1.1 hang up when updating apps?

    Why does my iPhone 4S hang up when updating apps from the update screen?

    I'm going to guess you have the original iPad, which means iOS7 isn't available for your device. 5.1.1 is the last update applied to the original iPad.

  • My iPad 2 gets hanged often after updating my iOS from iOS 7 to iOS 8

    my iPad 2 gets hanged often after updating my iOS from iOS 7.1.2 to iOS 8,what should I do?

    I'm sorry, but Apple does not provide a downgrade path for iOS. Because downgrading is unsupported by Apple we cannot discuss it on these forums.
    You may leave comments at Apple Feedback.

  • Unused paragraphs and character styles in the catalogs?

    How could I delete automatically the unused paragraphs and character styles from the catalogs?

    David,
    I downloaded it and placed the file in my plug-in folder, but it doesn't show up under File>Utilities. Is there anything else I should do?
    I am running FM9 with all updates.
    Thanks,
    ls

Maybe you are looking for