locked
WSUS Cleanup error "spDEleteREvision : cannot delete revisionid xxxxxx because it is still deployed to a non DSS Target Group" RRS feed

  • Question

  • I am running WSUS 3 SP2 W2k3 server with windows internal database. All appears to be working well except when the cleanup wizard is run.

    The wizard will consistently fail with error below if the "unused update and update revisions" option is selected. If this option is not selected the wizard runs clean. The wizard is run from the local server console.

    ==============================================================================

    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 -- spDeleteRevision: cannot delete revisionid: 5763 because it is still deployed to a Non DSS Target Group
    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 System.Windows.Forms.Control.Invoke(Delegate method)
       at Microsoft.UpdateServices.UI.SnapIn.Wizards.ServerCleanup.ServerCleanupWizard.OnCleanupComplete(Object sender, PerformCleanupCompletedEventArgs e)

    ==============================================================================

    The WSUS system has had WSUSDBMaintenance.sql run but this does not make any difference. The system has also been defragmented.

    What is a non DSS target group? What is revisionid xxxx or what patch does it refer to.

    Any suggestions to resolve this?

    Thursday, October 31, 2013 2:28 AM

Answers

  • The wizard will consistently fail with error below if the "unused update and update revisions" option is selected. If this option is not selected the wizard runs clean. The wizard is run from the local server console.

    This is natural behavior, an artifact of not having regularly run the tool previously and regularly. You'll just need to keep running the wizard with the "Delete unused updates.." function until it no longer times out.

    For more details and background see this blog series: WSUS Timeout Issues.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence R Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    • Marked as answer by Daniel JiSun Monday, November 11, 2013 1:13 AM
    Friday, November 1, 2013 1:38 AM
  • System.Data.SqlClient.SqlException -- spDeleteRevision: cannot delete revisionid: 5763 because it is still deployed to a Non DSS Target Group

    This is actually a BUG, because the SCW should be completely ignoring this update/revision because it does have an approval.

    My guess is that there are additional inconsistencies in the database contributing to this unexpected behavior.

    Ultimately, you'll need to REMOVE the approval(s) so the update can be deleted, but in order to do that, we'll need to identify which update involves "RevisionID=5763".

    I just migrated WSUS servers, so I'm lacking an instance of MgmtStudio on a working WSUS server at the moment. Once I get that back up, I'll see if I can get an indication as to which update is affected.

    In the meantime, the other thing that you can do is double-check that:

    - All Superseded Updates with 100% NA are Declined (check for older revisions with Approvals; I don't recall if Declining an update automatically impacts revisions)

    - All Superseded Updates with <100% NA are NotApproved (check for older revisions; there definitely can be a case where the current rev is NotApproved, but an older rev is still Approved)

    - All Updates with Revisions have older revisions NotApproved (and finding these will be tedious and time consuming).

    Also, one other thing we've seen muck stuff up like this is when an approval gets orphaned because it was set against a Target Group that no longer exists. Have you deleted any WSUS Target Groups from the server that might have had approvals for updates?


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence R Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.


    Friday, November 8, 2013 9:17 PM

All replies

  • The wizard will consistently fail with error below if the "unused update and update revisions" option is selected. If this option is not selected the wizard runs clean. The wizard is run from the local server console.

    This is natural behavior, an artifact of not having regularly run the tool previously and regularly. You'll just need to keep running the wizard with the "Delete unused updates.." function until it no longer times out.

    For more details and background see this blog series: WSUS Timeout Issues.


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence R Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

    • Marked as answer by Daniel JiSun Monday, November 11, 2013 1:13 AM
    Friday, November 1, 2013 1:38 AM
  • Hi Lawrence

    I have reviewed the articles you suggested and have done a major cleanup of WSUS. The "All Updates" display of "Any Except Declined" lists 1942 of 6329 total updates. The disc space for the patches has also been significantly reduced.

    Unfortunately this does not correct the issue. I have run the WSUS cleanup wizard, WSUSDBMaintenance.sql sequence at least 15+ times and the wizard appears to abort at the same spot as when I started. The error is

    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 -- spDeleteRevision: cannot delete revisionid: 5763 because it is still deployed to a Non DSS Target Group
    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)

    My question is the error is always referencing revisionid: 5763.  I am thinking that each successive run is not making any progress towards resolution. Is there any way of telling if there is any progress being made or is the wizard aborting on the same "record" every time. The DB properties per SQL management Studio show the DB is 3819.44 MB with 424.33MB free. A sample output of the WSUSDBmaintenance.sql is below.

    Changed database context to 'SUSDB'.
    Estimating fragmentation: Begin. 2013-11-04 13:23:29.840
    Number of indexes to rebuild: 3
    Estimating fragmentation: End. 2013-11-04 13:23:30.217
    2013-11-04 13:23:30.217 Executing: ALTER INDEX [nc6DeploymentRevision] ON [dbo].[tbDeployment] REORGANIZE
    2013-11-04 13:23:30.247 Done.
    2013-11-04 13:23:30.247 Executing: ALTER INDEX [PK__tbEventInstance__184D620B] ON [dbo].[tbEventInstance] REORGANIZE
    2013-11-04 13:23:30.403 Done.
    2013-11-04 13:23:30.403 Executing: ALTER INDEX [ncComputerTarget_FullDomainName] ON [dbo].[tbComputerTarget] REORGANIZE
    2013-11-04 13:23:30.403 Done.
    Estimated number of pages in fragmented indexes: 6948
    Estimated number of pages freed: 3
    Updating all statistics.2013-11-04 13:23:30.573
    Updating [dbo].[tbPrecomputedCategoryLocalizedProperty]
        [PK__tbPrecomputedCat__01D345B0], update is not necessary...
        [_WA_Sys_ShortLanguage_00DF2177], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbSchedule]
        [PK__tbSchedule__03DB89B3], update is not necessary...
        [_WA_Sys_00000002_00FF1D08], update is not necessary...
        [_WA_Sys_00000006_00FF1D08], update is not necessary...
        0 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Updating [dbo].[tbAutoDeploymentRule]
        [PK__tbAutoDeployment__0697FACD], update is not necessary...
        [_WA_Sys_Enabled_02C769E9], update is not necessary...
        [_WA_Sys_00000003_02C769E9], update is not necessary...
        0 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Updating [dbo].[tbDownstreamServerTarget]
        [PK__tbDownstreamServ__0425A276], update is not necessary...
        [_WA_Sys_00000004_03317E3D], update is not necessary...
        [ncDownstreamServerTarget_AccountServerID], update is not necessary...
        [_WA_Sys_00000003_03317E3D], update is not necessary...
        [_WA_Sys_00000007_03317E3D], update is not necessary...
        0 index(es)/statistic(s) have been updated, 5 did not require update.
     
    Updating [dbo].[tbEmailNotificationRecipient]
        [_WA_Sys_00000002_04CFADEC], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbTarget]
        [PK__tbTarget__07020F21], update is not necessary...
        [nc1Target], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbUpdateFlag]
        [PK__tbUpdateFlag__07AC1A97], update is not necessary...
        [_WA_Sys_00000002_06B7F65E], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbUpdateClassificationInAutoDeploymentRule]
        [PK__tbUpdateClassifi__0880433F], update is not necessary...
        [_WA_Sys_UpdateClassificationID_078C1F06], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbTargetType]
        [PK__tbTargetType__08EA5793], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbRevisionExtendedProperty]
        [cRevisionExtendedProperty], update is not necessary...
        [PK__tbRevisionExtend__09B45E9A], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbTargetGroupInAutoDeploymentRule]
        [PK__tbTargetGroupInA__0A688BB1], update is not necessary...
        [_WA_Sys_TargetGroupID_09746778], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbDeployment]
        [c0DeploymentRevision] has been updated...
        [PK__tbDeployment__15502E78] has been updated...
        [nc_RevisionID_TargetGroupID_ActionID] has been updated...
        [nc2DeploymentRevision] has been updated...
        [_WA_Sys_00000014_09DE7BCC] has been updated...
        [nc5DeploymentRevision] has been updated...
        [nc6DeploymentRevision] has been updated...
        [_WA_Sys_00000013_09DE7BCC] has been updated...
        [_WA_Sys_IsLeaf_09DE7BCC] has been updated...
        [_WA_Sys_ActionID_09DE7BCC] has been updated...
        [_WA_Sys_LastChangeTime_09DE7BCC] has been updated...
        [_WA_Sys_UpdateType_09DE7BCC] has been updated...
        [_WA_Sys_DeploymentStatus_09DE7BCC] has been updated...
        [_WA_Sys_Deadline_09DE7BCC] has been updated...
        [_WA_Sys_IsAssigned_09DE7BCC] has been updated...
        [_WA_Sys_DownloadPriority_09DE7BCC] has been updated...
        [_WA_Sys_DeploymentTime_09DE7BCC] has been updated...
        17 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbSchemaVersion]
        [PK__tbSchemaVersion__0D44F85C], update is not necessary...
        [_WA_Sys_ComponentName_0B5CAFEA], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbCategoryInAutoDeploymentRule]
        [PK__tbCategoryInAuto__0C70CFB4], update is not necessary...
        [_WA_Sys_00000002_0B7CAB7B], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbProgramKeys]
        [PK__tbProgramKeys__0E591826], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbConfigurationA]
        [PK__tbConfigurationA__1CBC4616], update is not necessary...
        [_WA_Sys_0000000E_0D7A0286], update is not necessary...
        [_WA_Sys_00000018_0D7A0286], update is not necessary...
        [_WA_Sys_0000000F_0D7A0286], update is not necessary...
        [_WA_Sys_00000004_0D7A0286], update is not necessary...
        0 index(es)/statistic(s) have been updated, 5 did not require update.
     
    Updating [dbo].[tbServerHealth]
        [PK__tbServerHealth__10216507], update is not necessary...
        [_WA_Sys_IsRunning_0E391C95] has been updated...
        [_WA_Sys_00000002_0E391C95] has been updated...
        2 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbComputersThatNeedDetailedRollup]
        [cComputersThatNeedDetailedRollup], update is not necessary...
        [_WA_Sys_00000002_0F4D3C5F], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbEventMessageTemplate]
        [PK__tbEventMessageTe__17593DD2], update is not necessary...
        [_WA_Sys_EventNamespaceID_10AB74EC], update is not necessary...
        [_WA_Sys_00000003_10AB74EC], update is not necessary...
        0 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Updating [dbo].[tbEventInstance]
        [PK__tbEventInstance__184D620B] has been updated...
        [nc3EventInstanceConstraint] has been updated...
        [nc_EventNamespaceID_EventID] has been updated...
        [nc2EventInstance] has been updated...
        [ncEventInstance_ComputerID_EventNamespaceID_EventID] has been updated...
        [nc4EventInstance] has been updated...
        [_WA_Sys_00000004_1293BD5E] has been updated...
        [_WA_Sys_TimeAtTarget_1293BD5E] has been updated...
        [_WA_Sys_RevisionNumber_1293BD5E] has been updated...
        [_WA_Sys_00000002_1293BD5E] has been updated...
        10 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbDeadDeployment]
        [PK__tbDeadDeployment__173876EA] has been updated...
        [nc1DeadDeployment] has been updated...
        [nc2DeadDeployment] has been updated...
        [nc3DeadDeployment] has been updated...
        [_WA_Sys_TargetGroupID_164452B1] has been updated...
        [_WA_Sys_LastChangeNumber_164452B1] has been updated...
        [_WA_Sys_0000000F_164452B1] has been updated...
        [_WA_Sys_00000003_164452B1] has been updated...
        [_WA_Sys_00000012_164452B1] has been updated...
        9 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbEvent]
        [PK__tbEvent__184C96B4], update is not necessary...
        [_WA_Sys_EventNamespaceID_16644E42], update is not necessary...
        [_WA_Sys_00000004_16644E42], update is not necessary...
        0 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Updating [dbo].[tbEventSource]
        [PK__tbEventSource__1A34DF26], update is not necessary...
        [_WA_Sys_EventNamespaceID_1940BAED], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbSingletonData]
        [PK__tbSingletonData__1D7C2B7C], update is not necessary...
        [_WA_Sys_00000004_19AB9A98], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbRevisionLanguage]
        [PK__tbRevisionLangua__1DE57479] has been updated...
        [nc1RevisionLanguage] has been updated...
        [_WA_Sys_Expanded_1B0907CE] has been updated...
        3 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbEventNamespace]
        [PK__tbEventNamespace__1C1D2798], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbImplicitCategory]
        [PK__tbImplicitCatego__208CD6FA], update is not necessary...
        [_WA_Sys_SubscriptionID_1DB06A4F], update is not necessary...
        [_WA_Sys_CategoryType_1DB06A4F], update is not necessary...
        [_WA_Sys_DeltaSync_1DB06A4F], update is not necessary...
        0 index(es)/statistic(s) have been updated, 4 did not require update.
     
    Updating [dbo].[tbProperty]
        [PK__tbProperty__22AA2996] has been updated...
        [nc1Property] has been updated...
        [nc2Property] has been updated...
        [_WA_Sys_ExplicitlyDeployable_1ED998B2] has been updated...
        [_WA_Sys_PublicationState_1ED998B2] has been updated...
        [_WA_Sys_ReceivedFromCreatorService_1ED998B2] has been updated...
        [_WA_Sys_CanInstall_1ED998B2] has been updated...
        [_WA_Sys_CanUninstall_1ED998B2] has been updated...
        [_WA_Sys_InstallationImpact_1ED998B2] has been updated...
        [_WA_Sys_InstallRebootBehavior_1ED998B2] has been updated...
        [_WA_Sys_InstallRequiresConnectivity_1ED998B2] has been updated...
        [_WA_Sys_InstallRequiresUserInput_1ED998B2] has been updated...
        [_WA_Sys_UninstallImpact_1ED998B2] has been updated...
        [_WA_Sys_UninstallRebootBehavior_1ED998B2] has been updated...
        [_WA_Sys_UninstallRequiresConnectivity_1ED998B2] has been updated...
        [_WA_Sys_UninstallRequiresUserInput_1ED998B2] has been updated...
        [_WA_Sys_CreationDate_1ED998B2] has been updated...
        [_WA_Sys_MsrcSeverity_1ED998B2] has been updated...
        [_WA_Sys_DefaultPropertiesLanguageID_1ED998B2] has been updated...
        [_WA_Sys_00000012_1ED998B2] has been updated...
        [_WA_Sys_00000015_1ED998B2] has been updated...
        21 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [sys].[queue_messages_516196889]
        [queue_clustered_index], update is not necessary...
        [queue_secondary_index], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbCategoryInSubscription]
        [PK__tbCategoryInSubs__22751F6C], update is not necessary...
        [_WA_Sys_SubscriptionID_2180FB33], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [sys].[queue_messages_548197003]
        [queue_clustered_index], update is not necessary...
        [queue_secondary_index], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbLanguageInSubscription]
        [PK__tbLanguageInSubs__25518C17], update is not necessary...
        [_WA_Sys_00000001_236943A5], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [sys].[queue_messages_580197117]
        [queue_clustered_index], update is not necessary...
        [queue_secondary_index], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbKBArticleForRevision]
        [PK__tbKBArticleForRe__24927208] has been updated...
        [nc1KBArticleForRevision] has been updated...
        [tbKBArticleForRevision_RevisionID_AK] has been updated...
        3 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbMoreInfoURLForRevision]
        [PK__tbMoreInfoURLFor__276EDEB3] has been updated...
        [_WA_Sys_00000004_25869641] has been updated...
        [nc_RevisionID_ShortLanguage] has been updated...
        3 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbLocaleMap]
        [PK__tbLocaleMap__269AB60B], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbOSMap]
        [PK__tbOSMap__2882FE7D], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbUpdateStatusPerComputer]
        [cUpdateStatusPerComputer] has been updated...
        [nc3UpdateStatusPerComputer] has been updated...
        [nc2UpdateStatusPerComputer] has been updated...
        [_WA_Sys_00000005_284DF453] has been updated...
        4 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbSecurityBulletinForRevision]
        [PK__tbSecurityBullet__29572725], update is not necessary...
        [nc1SecurityBulletinForRevision], update is not necessary...
        [tbSecurityBulletinForRevision_RevisionID_AK], update is not necessary...
        0 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Updating [dbo].[tbUpdateSummaryForAllComputers]
        [PK__tbUpdateSummaryF__2B2A60FE], update is not necessary...
        [_WA_Sys_00000002_2A363CC5], update is not necessary...
        [_WA_Sys_00000003_2A363CC5] has been updated...
        [_WA_Sys_00000004_2A363CC5] has been updated...
        [_WA_Sys_00000005_2A363CC5] has been updated...
        [_WA_Sys_00000006_2A363CC5] has been updated...
        [_WA_Sys_00000007_2A363CC5] has been updated...
        5 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbLocalizedPropertyForRevision]
        [PK__tbLocalizedPrope__2B3F6F97] has been updated...
        [_WA_Sys_LanguageID_2A4B4B5E] has been updated...
        [_WA_Sys_LocalizedPropertyID_2A4B4B5E] has been updated...
        3 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbFileForRevision]
        [PK__tbFileForRevisio__13F2C142] has been updated...
        [nc1FileForRevision] has been updated...
        [_WA_Sys_PatchingType_2C3393D0] has been updated...
        3 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbRevisionSupersedesUpdate]
        [PK__tbRevisionSupers__300424B4] has been updated...
        [_WA_Sys_SupersededUpdateID_2F10007B] has been updated...
        2 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbDownstreamServerRollupConfiguration]
        [PK__tbDownstreamServ__20E2A80C], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbEventRollupCounters]
        [PK__tbEventRollupCou__21D6CC45], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbFileHash]
        [PK__tbFileHash__31632898], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbInstalledUpdateSufficientForPrerequisite]
        [PK__tbInstalledUpdat__31EC6D26] has been updated...
        [nc1InstalledUpdateSufficientForPrerequisite] has been updated...
        2 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbComputerSummaryForMicrosoftUpdates]
        [PK__tbComputerSummar__32CB82C6], update is not necessary...
        [_WA_Sys_00000002_31D75E8D], update is not necessary...
        [_WA_Sys_00000003_31D75E8D] has been updated...
        [_WA_Sys_00000004_31D75E8D] has been updated...
        [_WA_Sys_00000006_31D75E8D] has been updated...
        [_WA_Sys_00000007_31D75E8D] has been updated...
        [_WA_Sys_00000005_31D75E8D] has been updated...
        5 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbBundleAtLeastOne]
        [tbBundleAtLeastOne_PK] has been updated...
        [nc1BundleAtLeastOne] has been updated...
        2 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbRevisionInCategory]
        [PK__tbRevisionInCate__367C1819] has been updated...
        [nc1RevisionInCategory] has been updated...
        [_WA_Sys_Expanded_339FAB6E] has been updated...
        3 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbBundleAll]
        [tbBundleAll_PK] has been updated...
        [nc1BundleAll] has been updated...
        2 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbPrerequisite]
        [PK__tbPrerequisite__37A5467C] has been updated...
        [nc1Prerequisite] has been updated...
        2 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbCategory]
        [PK__tbCategory__3B40CD36], update is not necessary...
        [nc1Category], update is not necessary...
        [_WA_Sys_ParentCategoryID_37703C52], update is not necessary...
        [_WA_Sys_00000001_37703C52], update is not necessary...
        0 index(es)/statistic(s) have been updated, 4 did not require update.
     
    Updating [dbo].[tbDriver]
        [PK__tbDriver__14E6E57B], update is not necessary...
        [nc1Driver], update is not necessary...
        [nc2Driver], update is not necessary...
        [_WA_Sys_00000008_38996AB5], update is not necessary...
        0 index(es)/statistic(s) have been updated, 4 did not require update.
     
    Updating [dbo].[tbRequestedTargetGroup]
        [PK__tbRequestedTarge__3A6CA48E], update is not necessary...
        [AK_Name], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbCompatiblePrinterProvider]
        [PK__tbCompatiblePrin__3B75D760], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbRequestedTargetGroupsForTarget]
        [PK__tbRequestedTarge__3C54ED00], update is not necessary...
        [nc1RequestedTargetGroupNamesForTarget], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbRevision]
        [PK__tbRevision__4F47C5E3] has been updated...
        [UQ__tbRevision__3D2915A8] has been updated...
        [ncRevision_LocalUpdateID_RevisionNumber__IsLatestRevision] has been updated...
        [_WA_Sys_00000015_3C34F16F] has been updated...
        [_WA_Sys_RevisionNumber_3C34F16F] has been updated...
        [_WA_Sys_IsLeaf_3C34F16F] has been updated...
        [_WA_Sys_IsLatestRevision_3C34F16F] has been updated...
        [_WA_Sys_IsMandatory_3C34F16F] has been updated...
        [_WA_Sys_State_3C34F16F] has been updated...
        [_WA_Sys_Origin_3C34F16F] has been updated...
        10 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbDriverClass]
        [PK__tbDriverClass__3D5E1FD2], update is not necessary...
        [_WA_Sys_Class_3C69FB99], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbDeletedComputer]
        [cDeletedComputer], update is not necessary...
        [_WA_Sys_00000002_3D491139], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbTargetGroup]
        [PK__tbTargetGroup__403A8C7D], update is not necessary...
        [_WA_Sys_TargetGroupTypeID_3E52440B], update is not necessary...
        [_WA_Sys_IsBuiltin_3E52440B], update is not necessary...
        [_WA_Sys_Name_3E52440B], update is not necessary...
        [_WA_Sys_00000007_3E52440B], update is not necessary...
        0 index(es)/statistic(s) have been updated, 5 did not require update.
     
    Updating [dbo].[tbComputerTargetDetail]
        [PK__tbComputerTarget__49AEE81E], update is not necessary...
        [_WA_Sys_00000018_40257DE4], update is not necessary...
        [_WA_Sys_00000002_40257DE4] has been updated...
        [_WA_Sys_00000003_40257DE4] has been updated...
        [_WA_Sys_00000004_40257DE4] has been updated...
        [_WA_Sys_00000005_40257DE4] has been updated...
        [_WA_Sys_00000006_40257DE4] has been updated...
        [_WA_Sys_00000007_40257DE4] has been updated...
        [_WA_Sys_0000000D_40257DE4] has been updated...
        [_WA_Sys_00000011_40257DE4], update is not necessary...
        [_WA_Sys_00000013_40257DE4] has been updated...
        [_WA_Sys_00000014_40257DE4] has been updated...
        [_WA_Sys_00000015_40257DE4] has been updated...
        [_WA_Sys_00000016_40257DE4] has been updated...
        [_WA_Sys_00000012_40257DE4], update is not necessary...
        [_WA_Sys_00000019_40257DE4] has been updated...
        12 index(es)/statistic(s) have been updated, 4 did not require update.
     
    Updating [dbo].[tbTargetGroupType]
        [PK__tbTargetGroupTyp__4222D4EF], update is not necessary...
        [_WA_Sys_Name_412EB0B6], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbEulaProperty]
        [tbEulaProperty_PK], update is not necessary...
        [nc1EulaProperty], update is not necessary...
        [nc2EulaProperty], update is not necessary...
        0 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Updating [dbo].[tbEulaAcceptance]
        [PK__tbEulaAcceptance__45F365D3], update is not necessary...
        [_WA_Sys_00000002_44FF419A], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbLocalizedProperty]
        [PK__tbLocalizedPrope__47DBAE45] has been updated...
        [_WA_Sys_Title_46E78A0C] has been updated...
        [_WA_Sys_00000003_46E78A0C] has been updated...
        [_WA_Sys_00000004_46E78A0C] has been updated...
        4 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbFile]
        [PK__tbFile__4BAC3F29], update is not necessary...
        [_WA_Sys_IsEula_48CFD27E], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbClientWithRecentNameChange]
        [c0ClientWithRecentNameChange] has been updated...
        [nc1ClientWithRecentNameChange] has been updated...
        [nc2ClientWithRecentNameChange] has been updated...
        3 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbXml]
        [PK__tbXml__4F7CD00D] has been updated...
        [nc1tbXml] has been updated...
        [nc2tbXml] has been updated...
        [_WA_Sys_LanguageID_4CA06362] has been updated...
        4 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbDownstreamServerSummaryRollup]
        [PK__tbDownstreamServ__4E739D3B], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbDownstreamServerClientSummaryRollup]
        [PK__tbDownstreamServ__542C7691], update is not necessary...
        [_WA_Sys_00000001_4F67C174], update is not necessary...
        [_WA_Sys_00000003_4F67C174], update is not necessary...
        [_WA_Sys_00000004_4F67C174], update is not necessary...
        [_WA_Sys_00000005_4F67C174], update is not necessary...
        [_WA_Sys_00000006_4F67C174], update is not necessary...
        [_WA_Sys_00000007_4F67C174], update is not necessary...
        [_WA_Sys_00000008_4F67C174], update is not necessary...
        [_WA_Sys_00000009_4F67C174], update is not necessary...
        [_WA_Sys_00000013_4F67C174], update is not necessary...
        [_WA_Sys_0000000C_4F67C174], update is not necessary...
        [_WA_Sys_0000000D_4F67C174], update is not necessary...
        [_WA_Sys_0000000E_4F67C174], update is not necessary...
        0 index(es)/statistic(s) have been updated, 13 did not require update.
     
    Updating [dbo].[tbRevisionExtendedLanguageMask]
        [PK__tbRevisionExtend__57DD0BE4], update is not necessary...
        [_WA_Sys_00000002_503BEA1C], update is not necessary...
        [_WA_Sys_00000003_503BEA1C], update is not necessary...
        [_WA_Sys_00000004_503BEA1C], update is not necessary...
        [_WA_Sys_00000005_503BEA1C], update is not necessary...
        [_WA_Sys_00000006_503BEA1C], update is not necessary...
        [_WA_Sys_00000007_503BEA1C], update is not necessary...
        [_WA_Sys_00000008_503BEA1C], update is not necessary...
        0 index(es)/statistic(s) have been updated, 8 did not require update.
     
    Updating [dbo].[tbGroupAuthorization]
        [PK__tbGroupAuthoriza__5165187F], update is not necessary...
        [_WA_Sys_00000002_5070F446], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbAuthorization]
        [PK__tbAuthorization__534D60F1], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbFileOnServer]
        [c0FileOnServer], update is not necessary...
        [PK__tbFileOnServer__17C35226], update is not necessary...
        [_WA_Sys_DesiredState_5441852A], update is not necessary...
        [_WA_Sys_ActualState_5441852A], update is not necessary...
        [_WA_Sys_TimeAddedToQueue_5441852A], update is not necessary...
        [_WA_Sys_00000007_5441852A], update is not necessary...
        0 index(es)/statistic(s) have been updated, 6 did not require update.
     
    Updating [dbo].[tbDownstreamServerClientActivityRollup]
        [PK__tbDownstreamServ__5614BF03], update is not necessary...
        [_WA_Sys_00000002_55209ACA], update is not necessary...
        [_WA_Sys_00000003_55209ACA], update is not necessary...
        0 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Updating [dbo].[tbInventoryRule]
        [PK__tbInventoryRule__5728DECD], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbInventoryClass]
        [PK__tbInventoryClass__5911273F], update is not necessary...
        [UQ__tbInventoryClass__5A054B78], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbUpdate]
        [PK__tbUpdate__5D95E53A] has been updated...
        [UQ__tbUpdate__5E8A0973] has been updated...
        [_WA_Sys_UpdateTypeID_58D1301D] has been updated...
        [_WA_Sys_IsHidden_58D1301D] has been updated...
        [_WA_Sys_LegacyName_58D1301D] has been updated...
        [_WA_Sys_DetectoidType_58D1301D] has been updated...
        [_WA_Sys_IsPublic_58D1301D] has been updated...
        [nc1UpdateIsLocallyPublished] has been updated...
        [_WA_Sys_0000000A_58D1301D] has been updated...
        [_WA_Sys_0000000C_58D1301D] has been updated...
        10 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbFileDownloadProgress]
        [c0FileDownloadProgress], update is not necessary...
        [PK__tbFileDownloadPr__18B7765F], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbFlattenedTargetGroup]
        [cFlattenedTargetGroup], update is not necessary...
        [_WA_Sys_00000002_5AD97420], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbInventoryProperty]
        [PK__tbInventoryPrope__5BED93EA], update is not necessary...
        [nc_ClassID_Name], update is not necessary...
        [_WA_Sys_00000003_5AF96FB1], update is not necessary...
        [_WA_Sys_00000004_5AF96FB1], update is not necessary...
        0 index(es)/statistic(s) have been updated, 4 did not require update.
     
    Updating [dbo].[tbInventoryXml]
        [PK__tbInventoryXml__5DD5DC5C], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbExpandedTargetInTargetGroup]
        [PK__tbExpandedTarget__5EAA0504], update is not necessary...
        [nc1ExpandedTargetInTargetGroup], update is not necessary...
        [_WA_Sys_00000003_5DB5E0CB], update is not necessary...
        0 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Updating [dbo].[tbUpdateType]
        [PK__tbUpdateType__607251E5], update is not necessary...
        [_WA_Sys_Name_5F7E2DAC], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbReference]
        [_WA_Sys_00000003_5FB337D6], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbInventoryClassInstance]
        [PK__tbInventoryClass__60B24907], update is not necessary...
        [nc_TargetID_ClassID_KeyValue], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbHandler]
        [PK__tbHandler__625A9A57], update is not necessary...
        [_WA_Sys_SchemaURI_6166761E], update is not necessary...
        [_WA_Sys_00000002_6166761E], update is not necessary...
        0 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Updating [dbo].[tbInventoryPropertyInstance]
        [PK__tbInventoryPrope__629A9179], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbConfigurationC]
        [PK__tbConfigurationC__73BA3083], update is not necessary...
        [_WA_Sys_00000006_628FA481], update is not necessary...
        [_WA_Sys_00000007_628FA481], update is not necessary...
        [_WA_Sys_00000010_628FA481], update is not necessary...
        [_WA_Sys_00000013_628FA481], update is not necessary...
        0 index(es)/statistic(s) have been updated, 5 did not require update.
     
    Updating [dbo].[tbLanguage]
        [PK__tbLanguage__671F4F74], update is not necessary...
        [nc1Language], update is not necessary...
        [_WA_Sys_Enabled_634EBE90], update is not necessary...
        [_WA_Sys_00000007_634EBE90], update is not necessary...
        0 index(es)/statistic(s) have been updated, 4 did not require update.
     
    Updating [dbo].[tbCategoryType]
        [PK__tbCategoryType__690797E6], update is not necessary...
        0 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbFrontEndServersHealth]
        [_WA_Sys_00000001_68336F3E], update is not necessary...
        [_WA_Sys_00000002_68336F3E], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbStateMachine]
        [PK__tbStateMachine__6AEFE058], update is not necessary...
        [nc1StateMachine], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbStateMachineState]
        [PK__tbStateMachineSt__6CD828CA], update is not necessary...
        [nc1StateMachineState], update is not necessary...
        [stateNameUniqueForStateMachineID], update is not necessary...
        [_WA_Sys_StateID_6BE40491], update is not necessary...
        0 index(es)/statistic(s) have been updated, 4 did not require update.
     
    Updating [dbo].[tbStateMachineEvent]
        [PK__tbStateMachineEv__6FB49575], update is not necessary...
        [nc1StateMachineEvent], update is not necessary...
        [eventNameUniqueForStateMachineID], update is not necessary...
        [_WA_Sys_EventID_6EC0713C], update is not necessary...
        0 index(es)/statistic(s) have been updated, 4 did not require update.
     
    Updating [dbo].[tbStateMachineTransition]
        [PK__tbStateMachineTr__72910220], update is not necessary...
        [_WA_Sys_StateID_719CDDE7], update is not necessary...
        [_WA_Sys_EventID_719CDDE7], update is not necessary...
        [_WA_Sys_NewStateID_719CDDE7], update is not necessary...
        0 index(es)/statistic(s) have been updated, 4 did not require update.
     
    Updating [dbo].[tbStateMachineEventTransitionLog]
        [PK__tbStateMachineEv__756D6ECB], update is not necessary...
        [_WA_Sys_00000002_73852659], update is not necessary...
        [_WA_Sys_00000003_73852659], update is not necessary...
        [_WA_Sys_00000005_73852659], update is not necessary...
        [_WA_Sys_00000006_73852659], update is not necessary...
        [_WA_Sys_00000007_73852659], update is not necessary...
        0 index(es)/statistic(s) have been updated, 6 did not require update.
     
    Updating [dbo].[tbSchemaVersionHistory]
        [PK__tbSchemaVersionH__74D93D45], update is not necessary...
        [_WA_Sys_00000002_73E5190C], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbConfigurationB]
        [PK__tbConfigurationB__0C85DE4D], update is not necessary...
        [_WA_Sys_00000003_74AE54BC], update is not necessary...
        [_WA_Sys_00000002_74AE54BC], update is not necessary...
        0 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Updating [dbo].[tbNotificationEvent]
        [PK__tbNotificationEv__7849DB76], update is not necessary...
        [_WA_Sys_RowID_7755B73D], update is not necessary...
        [_WA_Sys_State_7755B73D] has been updated...
        [_WA_Sys_NotificationEventName_7755B73D], update is not necessary...
        1 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Updating [dbo].[tbChangeTracking]
        [c0ChangeTracking] has been updated...
        [PK__tbChangeTracking__7A3223E8] has been updated...
        2 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbTargetInTargetGroup]
        [PK__tbTargetInTarget__7A9C383C], update is not necessary...
        [nc1TargetInTargetGroup], update is not necessary...
        0 index(es)/statistic(s) have been updated, 2 did not require update.
     
    Updating [dbo].[tbFlattenedRevisionInCategory]
        [PK__tbFlattenedRevis__7C1A6C5A] has been updated...
        [nc1FlattenedRevisionInCategory] has been updated...
        2 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbPrerequisiteDependency]
        [PK__tbPrerequisiteDe__7C8480AE] has been updated...
        [nc1PrerequisiteDependency] has been updated...
        [nc2PrerequisiteDependency] has been updated...
        3 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbServerSyncResult]
        [PK__tbServerSyncResu__7E02B4CC], update is not necessary...
        [nc1ServerSyncResult], update is not necessary...
        [nc2tbServerSyncResult], update is not necessary...
        0 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Updating [dbo].[tbBundleDependency]
        [PK__tbBundleDependen__7E6CC920] has been updated...
        [nc1BundleDependency] has been updated...
        2 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbPreComputedLocalizedProperty]
        [PK__tbPreComputedLoc__7FEAFD3E] has been updated...
        [nc1PreComputedLocalizedProperty] has been updated...
        [ncPreComputedLocalizedProperty_RevisionID_ShortLanguage] has been updated...
        [_WA_Sys_ShortLanguage_7EF6D905] has been updated...
        [_WA_Sys_Title_7EF6D905] has been updated...
        [_WA_Sys_00000004_7EF6D905] has been updated...
        [_WA_Sys_00000005_7EF6D905] has been updated...
        7 index(es)/statistic(s) have been updated, 0 did not require update.
     
    Updating [dbo].[tbConfiguration]
        [PK__tbConfiguration__000AF8CF], update is not necessary...
        [_WA_Sys_00000002_7F16D496] has been updated...
        1 index(es)/statistic(s) have been updated, 1 did not require update.
     
    Updating [dbo].[tbComputerTarget]
        [PK__tbComputerTarget__023D5A04], update is not necessary...
        [UQ__tbComputerTarget__00551192] has been updated...
        [nc1ComputerTarget] has been updated...
        [nc5ComputerTarget] has been updated...
        [nc4ComputerTarget] has been updated...
        [ncComputerTarget_FullDomainName] has been updated...
        [_WA_Sys_LastSyncTime_7F60ED59] has been updated...
        [nc_EffectiveLastDetectionTime] has been updated...
        [_WA_Sys_0000001C_7F60ED59], update is not necessary...
        [_WA_Sys_00000006_7F60ED59], update is not necessary...
        7 index(es)/statistic(s) have been updated, 3 did not require update.
     
    Statistics for all tables have been updated.
    Done updating statistics.2013-11-04 13:23:45.013

    Monday, November 4, 2013 7:29 PM
  • System.Data.SqlClient.SqlException -- spDeleteRevision: cannot delete revisionid: 5763 because it is still deployed to a Non DSS Target Group

    This is actually a BUG, because the SCW should be completely ignoring this update/revision because it does have an approval.

    My guess is that there are additional inconsistencies in the database contributing to this unexpected behavior.

    Ultimately, you'll need to REMOVE the approval(s) so the update can be deleted, but in order to do that, we'll need to identify which update involves "RevisionID=5763".

    I just migrated WSUS servers, so I'm lacking an instance of MgmtStudio on a working WSUS server at the moment. Once I get that back up, I'll see if I can get an indication as to which update is affected.

    In the meantime, the other thing that you can do is double-check that:

    - All Superseded Updates with 100% NA are Declined (check for older revisions with Approvals; I don't recall if Declining an update automatically impacts revisions)

    - All Superseded Updates with <100% NA are NotApproved (check for older revisions; there definitely can be a case where the current rev is NotApproved, but an older rev is still Approved)

    - All Updates with Revisions have older revisions NotApproved (and finding these will be tedious and time consuming).

    Also, one other thing we've seen muck stuff up like this is when an approval gets orphaned because it was set against a Target Group that no longer exists. Have you deleted any WSUS Target Groups from the server that might have had approvals for updates?


    Lawrence Garvin, M.S., MCITP:EA, MCDBA, MCSA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2013)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence R Garvin
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.


    Friday, November 8, 2013 9:17 PM
  • I had the same problem with the "unused updates and update revisions" task. It is true that there is a known issue with this task failing when it hasn't ran for quit a while. This is caused by timeouts. The problem described here is definitely not caused by that.

    The error in the Event Viewer refers to  a specific revisionID which spDeleteRevision cannot delete.
    spDeleteUpdate is the procedure which starts spDeleteRevision and gets the error back.
    When you open both procedures in the SQL Server query editor you will see the actual error messages which you find in the event viewer.

    The problem is that WSUS tries to delete records wich have actionID 5 in tbDeployment. ActionID 5 means the update is part of a bundle. I cannot find the cause of this because the spDeleteUpdate has to executed providing the localUpdateID, and there are no stored procedures or functions in the database which do this. This is probably triggered by code within WSUS. 
    In my case the cleanup was working fine 2 months ago, and I suddenly had 18000 of this problematic records. I tried to fix it by deleting the records using the stored procedures in the database. But all failed to do so because they will not delete anything with actionID 5. The updates I found in the database were not even visible in the WSUS GUI! They are not used in my configuration of WSUS. That's why I finally decided to manually delete the problematic records. 

    I finally fixed it by manually deleting the records from tbDeployment and tbBundleAtLeastOne tables. But of course; this is in no way supported by Microsoft. Before I did that I used spDeclineUpdate to decline the updates corresponding to those records. 

    I used this script to find the problematic records:

    SELECT tg.Name as TargetGroupName, d.* 
    into #BadDeploymentRecords
    FROM dbo.tbDeployment as d
    left join tbTargetGroup as tg
    on d.TargetGroupId = tg.TargetGroupId
    where ActionID = 5 and d.TargetGroupTypeID = 0

    You can find more information on those records by using this query:

    -- get update and other information for revision
    select u.localUpdateID as localUpdateID2, t.name as TypeName, u.UpdateID, u.IsHidden as IsDeclined 
    , ParentCat.CategoryType as parentCategoryType, c.CategoryType
    , lp.Title as DefaultTitle, lp.Description as DefaultDescription
    , uc.UpdateID as ClassificationId
    , (SELECT TOP 1 KBArticleID 
    FROM dbo.tbKBArticleForRevision WHERE RevisionID = r.RevisionID ORDER BY KBArticleID DESC) as KnowledgebaseArticle
    , p.ExplicitlyDeployable 
    , (CASE p.PublicationState 
                WHEN 0 THEN N'Published' 
                WHEN 1 THEN N'Expired' 
                ELSE NULL 
                END) as PublicationState
    , (CASE uc.UpdateID 
                WHEN '5C9376AB-8CE6-464a-B136-22113DD69801' THEN N'SoftwareApplication' 
                ELSE p.UpdateType 
                END) as UpdateType
    , (CASE u.IsLocallyPublished 
                WHEN 0 THEN N'MicrosoftUpdate' 
                ELSE N'Other' 
                END) as UpdateSource
    , r.*, p.CreationDate, p.ReceivedFromCreatorService, p.CanInstall
    , p.HandlerID, p.DefaultPropertiesLanguageID, p.msrcSeverity
    --into #BadUpdateRecords
    from dbo.tbUpdate u
    inner join tbUpdateType as t
    on u.updateTypeID = t.UpdateTypeID
    INNER JOIN dbo.tbRevision r 
    ON u.LocalUpdateID = r.LocalUpdateID
    left join tbRevisionInCategory as rc
    ON rc.RevisionID = r.RevisionID --AND rc.Expanded = 0
    left JOIN dbo.tbProperty p 
    ON r.RevisionID = p.RevisionID
    left join tbCategory as c
    on rc.CategoryID = c.CategoryID
    left JOIN dbo.tbUpdate uc 
    ON uc.LocalUpdateID = rc.CategoryID
    left join tbCategory as ParentCat
    on c.ParentCategoryID = ParentCat.CategoryID
    left JOIN dbo.tbLocalizedPropertyForRevision lpr ON 
    lpr.RevisionID = r.RevisionID AND lpr.LanguageID = p.DefaultPropertiesLanguageID
    left JOIN dbo.tbLocalizedProperty lp ON 
    lp.LocalizedPropertyID = lpr.LocalizedPropertyID
    where r.revisionID in (select RevisionID from #BadDeploymentRecords)
    --where u.localUpdateId = 27
    order by u.localUpdateId
    go

    It would be very helpful if Microsoft would provide a solution to this problem; without a solution you will probably never get WSUS to work again, unless you start over with a new WSUS database. I would like to see a supported solution from Microsoft for this problem. This research cost me a day to figure out and it is of course not a supported solution.

    Wednesday, August 20, 2014 6:43 AM
  • The problem is that WSUS tries to delete records wich have actionID 5 in tbDeployment. ActionID 5 means the update is part of a bundle.

    Since one cannot approve a component of a bundle, the most likely cause here is that there's an orphaned approval for the parent of that bundle. Also note that we've seen these issues when Computer GROUPS get deleted and the approvals for that computer group don't get removed before deleting the group, again resulting in an orphaned approval that can no longer been seen, much less removed.

    It is possible to trace a bundle back to the parent Update, which would be visible in the console. I've done this previously to help trace down the issues with the IE9 Irish Language Pack issue.


    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.

    Thursday, August 21, 2014 2:53 PM
  • I found a much more simple solution to the WSUS "...because it is still deployed to a non DSS Target Group" error .

    Simply set the parent ALL COMPUTERS to N/A and then click APPLY TO CHILDREN, even if the children are already set to N/A but not inherited:

    http://www.urtech.ca/2016/11/solved-wsus-exception-calling-deleteupdate-still-deployed-non-dss-target-group/

    I hope this helps.


    Ian Matthews www.urtech.ca www.commodore.ca

    Tuesday, November 22, 2016 4:47 PM