locked
Wsus last synchronization status RRS feed

  • Question

  • Hi,

    I want to query from Windows Internal Database the last synchronization state of wsus.

    i found the table SUSDB.dbo.DownstreamServerRollupConfiguration that seem to give what i search for, but i don't know which column and which number indicate success. 

    I would like to have a query that indicates on last synchronization date and synchronization status(success, fail ..)

    thanks



    Thursday, October 11, 2018 11:19 AM

Answers

  • Hello,

    1> Yes.

    2> Sorry for missing the input. Event Id 386 indicates a failure of synchronization. I get the following information from this blog and EventID.net.

    • Event ID 381: A scheduled synchronization was started.
    • Event ID 382: Synchronization started on WSUS server.
    • Event ID 384: Synchronization completed successfully.
    • Event ID 386: Synchronization failed.

     
    3> 
    You can create complex hierarchies of WSUS servers. Because you can synchronize one WSUS server with another WSUS server instead of with Microsoft Update, you need to have only a single WSUS server that is connected to Microsoft Update. When you link WSUS servers together, there is an upstream WSUS server and a downstream WSUS server. The upstream server could roll up status from replica downstream servers which means the status of the clients pointed to the downstream servers.
      


    You could get more detailed information about upstream/replica downstream/autonomous downstream from following document.
     
    WSUS server hierarchies
    https://docs.microsoft.com/en-us/windows-server/administration/windows-server-update-services/plan/plan-your-wsus-deployment#wsus-server-hierarchies
     
    Hope my answer could help you.
     
    Best Regards,
    Ray


    Please remember to mark the replies as answers if they help.

    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Monday, October 15, 2018 1:19 AM

All replies

  • Hello,
     
    Are you looking for synchronization status between upstream and downstream or between WSUS and WU?
     
    If you want to query the sync status from downstream, the information is under table tbDownstreamServerRollupConfiguration.

    If you are looking for the status from WU, the information should be in the table tbEventInstance, you could query it via following script.
     
    USE SUSDB 
    GO 
    select * FROM tbEventInstance WHERE EventNamespaceID = '2' AND EVENTID IN ('381', '382', '384', '386', '387', '389')
     
    The event id 384 indicates a successful synchronization while event id 386 indicates a failed one.
     
    However, WID does not store the sync information directly, so it's hard to query the synchronization status directly from it. You could use PowerShell script to get the status which is simpler and more convenient.
     
    #Load required assemblies
    [void][reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")
        
    $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer()
        
    $wsus
    #$wsus=Get-WsusServer
    $sub=$wsus.GetSubscription()
    
    #get synchronization data
    $sub.GetSynchronizationHistory()
     
    Hope my answer could help you.
     
    Best Regards,
    Ray 

    Please remember to mark the replies as answers if they help.

    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Friday, October 12, 2018 5:20 AM
  • Hello,
     
    Are you looking for synchronization status between upstream and downstream or between WSUS and WU?
     
    If you want to query the sync status from downstream, the information is under table tbDownstreamServerRollupConfiguration.

    If you are looking for the status from WU, the information should be in the table tbEventInstance, you could query it via following script.
     
    USE SUSDB 
    GO 
    select * FROM tbEventInstance WHERE EventNamespaceID = '2' AND EVENTID IN ('381', '382', '384', '386', '387', '389')
     
    The event id 384 indicates a successful synchronization while event id indicates a failed one.
     
    However, WID does not store the sync information directly, so it's hard to query the synchronization status directly from it. You could use PowerShell script to get the status which is simpler and more convenient.
     
    #Load required assemblies
    [void][reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")
        
    $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer()
        
    $wsus
    #$wsus=Get-WsusServer
    $sub=$wsus.GetSubscription()
    
    #get synchronization data
    $sub.GetSynchronizationHistory()
     
    Hope my answer could help you.
     
    Best Regards,
    Ray 

    Please remember to mark the replies as answers if they help.


    Hi Ray, First of all I appreciate your detailed answer  , thanks !

    The powershell script seems to be very useful but i have some issues with the database that i want to make clear.

    1)When you referring to WU you mean to Microsoft update catalog ? because I search for the synchronization status with the catalog.

    2)About EVENTID, you told that 384 indicates a successful sync, but i didn't understand which one indicates error. I'll be glad to see documentation on every ID and what it means ( or just some words about every EVENTID that might be useful).

    3)Can you please explain a bit what is upstream ,downstream and what is rollup ?

    Thanks again !

    Best Regards,

    Amit


    Sunday, October 14, 2018 5:53 AM
  • Hello,

    1> Yes.

    2> Sorry for missing the input. Event Id 386 indicates a failure of synchronization. I get the following information from this blog and EventID.net.

    • Event ID 381: A scheduled synchronization was started.
    • Event ID 382: Synchronization started on WSUS server.
    • Event ID 384: Synchronization completed successfully.
    • Event ID 386: Synchronization failed.

     
    3> 
    You can create complex hierarchies of WSUS servers. Because you can synchronize one WSUS server with another WSUS server instead of with Microsoft Update, you need to have only a single WSUS server that is connected to Microsoft Update. When you link WSUS servers together, there is an upstream WSUS server and a downstream WSUS server. The upstream server could roll up status from replica downstream servers which means the status of the clients pointed to the downstream servers.
      


    You could get more detailed information about upstream/replica downstream/autonomous downstream from following document.
     
    WSUS server hierarchies
    https://docs.microsoft.com/en-us/windows-server/administration/windows-server-update-services/plan/plan-your-wsus-deployment#wsus-server-hierarchies
     
    Hope my answer could help you.
     
    Best Regards,
    Ray


    Please remember to mark the replies as answers if they help.

    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Monday, October 15, 2018 1:19 AM
  • Ray, You helped me a lot.

    Everything is articulately explained.

    Thanks a lot.

    Best Regards,

    Amit.

    Monday, October 15, 2018 5:36 AM