locked
Event ID 7042 WSUS error on Windows server 2016 RRS feed

  • Question

  • 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 checked in Event viewer, i see the description of this error. 

    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 -- The DELETE statement conflicted with the REFERENCE constraint "FK__tbBundleA__Revis__4830B400". The conflict occurred in database "SUSDB", table "dbo.tbBundleAtLeastOne", column 'RevisionID'.
    spDeleteRevision: cannot delete revisionid: 763802 failed to delete from tbRevision
    spCompressUpdate got error from spDeleteRevision
    The statement has been terminated.

    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)


    Thursday, March 26, 2020 5:58 AM

All replies

  • Hi,
     
    The performance of WSUS deployments will degrade over time if the WSUS database is not maintained properly. The problem you mentioned may be caused by database corruption. WSUSDBMaintenance script may fix this problem. It is recommended to refer to the script in the link below.
     
    Reference link:  https://gallery.technet.microsoft.com/scriptcenter/6f8cde49-5c52-4abd-9820-f1d270ddea61
     
    If you have any questions, please keep us in touch.
     
    Regards,
    Rita

    Please remember to mark as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Friday, March 27, 2020 9:38 AM
  • Hi Rita,

    I have tried that one also, post re-indexing we are getting the same error. 

    Monday, March 30, 2020 5:46 AM
  • Hi,
      

    This seems to be a database problem. I don't know much about the contents of the database. I will do my best to provide you with the best service within my ability. You can consider the following actions to resolve. Or consider going to a database forum for help.

    To remove WSUS completely, you need to:

    1. Remove the following server roles and features through Server Manager:
    Roles: Windows Server Update Server
    features: Windows Server Update Services Tools(at Remote Server Administration Tools -> Role Administration Tools)
    Follow the wizard prompts to complete the deletion. Then restart the server.

    2. After the server is restarted, manually delete the folder or file of the following path:
    - C:\WSUS (this depends on where you choose to install WSUS)
    - C:\Program Files\Update Services

    3. Delete database files
    If you use SQL Server Management Studio to delete a database, you can try as follow.
    In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.Expand Databases, right-click the database to delete, and then click Delete.Confirm the correct database is selected, and then click OK.

    4. In the IIS Information Services (IIS) Manager, manually remove the WSUS Administration site. Then restart the server. 
    Or, you can also consider using the Powershell command Remove-WebSite -Name "WSUS Administration" for deletion.

    After you have completely removed WSUS Role, you can reinstall WSUS Role.Reference link: https://docs.microsoft.com/en-us/windows-server/administration/windows-server-update-services/deploy/1-install-the-wsus-server-role

    If you have any questions, please keep us in touch.

    Regards,
    Rita    


    Please remember to mark as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.



    Tuesday, March 31, 2020 9:48 AM
  • Hi,
     
    It seems there is no update for a couple of days. May we know the current status of the problem? Is there any other assistance we can provide?
     
    If you have any questions, please keep us in touch.
     
    Regards,
    Rita

    Please remember to mark as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, April 7, 2020 11:12 AM