locked
WSUS 2012 error 7042 RRS feed

  • Question

  • when i try to clean unwanted update the wsus crash and i found this error on event viewer please note that i dont have SQL server and the server role installed on WID data base the error number id is 7042 and the description as bellow 

    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 -- @errorMessage
    spDeleteUpdate got error from spDeleteRevision

    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)

    }


    Sunday, February 10, 2019 8:29 AM

All replies

  • Hi,

     

    Depending on what you mentioned, these two ways may help you.

     

    Log in to the database and clean up the expired updates.

     

    1.  Download and install SQL Server Management Studio (SSMS)

    2.  Run SSMS as an administrator and enter "\\.\pipe\MICROSOFT##WID\tsql\query" under server name.

    3.  Click "options" and select "Named Pipes" under "Network protocol" under the "Connection Properties" tab.

    4.  Click "Connect"

    5.  Execute a query for:

    USE SUSDB
    GO
    exec spGetObsoleteUpdatesToCleanup

    You will see a list of obsolete updates pop up. Take note of these UpdateID’s.

    6.  Execute: 

    exec spDeleteUpdate @localUpdateID=000000

    Where 000000=UpdateID

     

    Increase the timeout on the SQL server:

     

    1.  Right click on "\\.\pipe\MICROSOFT##WID\tsql\query" (first in the row on the left)

    2.  Select "Properties"

    3.  Select "Connections"

    4.  Set timeout from default 600 to 1200 (or greater, avoid 0 as this is unlimited and not best practise).

     

    Reply back with the results would be happy to help.

     

    Regards,
    Yic Lv

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

    Monday, February 11, 2019 6:42 AM
  • thanks man please add note to run SSMS as administrator coz i try a lot to work with no luck then after troubleshooting  i found that even im administrator im must run ssms with holding Ctrl+Shift to run it as administrator and connect to the WID database but i run in other problem they are 1289 raws how to delete them all 

    and thanks again 

    Tuesday, February 12, 2019 9:18 AM
  • thanks man please add note to run SSMS as administrator coz i try a lot to work with no luck then after troubleshooting  i found that even im administrator im must run ssms with holding Ctrl+Shift to run it as administrator and connect to the WID database but i run in other problem they are 1289 raws how to delete them all 

    and thanks again 

    Hi ahmad alhendi,
     

    Thank you very much for reminding me. I have added this part.
     

    Regards,
    Yic Lv

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

    Tuesday, February 12, 2019 9:35 AM