SCCM SCUP WSUS Delete orphaned update with missing XML

Today I tried to expire old adobe reader and flash updates in SCUP, however some of updates failed to expire, most of them finished with success.
After publish I see only information that Publish Update failed.
What I tried:
1. use regular expire update – normal method
2. I skipped this because my issue was quite differed – https://blogs.technet.microsoft.com/jasonlewis/2010/06/16/how-to-remove-orphaned-scup-updates/

What I found:
1. SCUP trhows that expire update failed – no more errors. On SCUP.log I found:
PublishItem: --- Calling update server API to *expire* update 'Reader 11.0.01 Update (UpdateId:'e066fa50-eab2-4dba-bae2-0a36ca61c2fa' Vendor:'Adobe Systems, Inc.' Product:'Adobe Reader')' Updates Publisher 1601-01-01 00:00:00 11 (0x000B)
PublishItem: Exception occurred attempting to expire the update: The specified item could not be found in the database. Updates Publisher 1601-01-01 00:00:00 11 (0x000B)

This doesn’t give me more info…

2. I inspected WSUS Server log – %ProgramFiles%\Update Services\LogFiles\SoftwareDistribution.log
2016-07-20 07:59:28.569 UTC Warning w3wp.140 SoapExceptionProcessor.SerializeAndThrow Discarding stack trace for user ******\adam.hnat, IP Address ::1, exception Microsoft.UpdateServices.Administration.WsusObjectNotFoundException: The specified item could not be found in the database. ---> System.Data.SqlClient.SqlException: There is no SDP Xml for this Update
at Microsoft.UpdateServices.DatabaseAccess.DBConnection.DrainObsoleteConnections(SqlException e)
at Microsoft.UpdateServices.DatabaseAccess.DBConnection.ExecuteReader()
at Microsoft.UpdateServices.Internal.SingleResultSetSPHandler.ExecuteStoredProcedure(DBConnection connection)
at Microsoft.UpdateServices.Internal.GenericDataAccess.ExecuteSP(String spName, DBParameterCollection args, IExecuteSPHandler handler, Int32 queryTimeoutInSeconds)
at Microsoft.UpdateServices.Internal.GenericDataAccess.ExecuteSP(String spName, DBParameterCollection args, IExecuteSPHandler handler)
at Microsoft.UpdateServices.Internal.DatabaseAccess.CommonDataAccess.ExecuteSPSingleResultSet(String spName, DBParameterCollection args, Type resultType, Int32 queryTimeoutInSeconds)
at Microsoft.UpdateServices.Internal.DatabaseAccess.AdminDataAccess.ExecuteSPGetSdpXmlForUpdate(Guid updateId, Int32 revisionNumber)

It seems that SQL query returned “There is no SDP Xml for this Update”. Let’s check that!
I’ve exected query on SUSDB:
exec exec spGetSdpXmlForUpdate @updateID='E066FA50-EAB2-4DBA-BAE2-0A36CA61C2FA',@revisionNumber=2
and it returned: There is no SDP Xml for this Update

3. In this step I checked what is in spGetSdpXmlForUpdate procedure, check table contents and found that table tbUpdates is populated with Update ID, table tbXML contains UpdateID but doesn’t contain SDP XML for my update

4. [Solution] I was looking for method to fill in missing info based on updated XML avaliable in SCUP … but I was too lazy to write scripts that will fix that. Instead of that I’ve decided to remove update inforamtion from database, so I executed query on SUSDB:
exec dbo.spDeleteUpdateByUpdateID @updateID='dc3d262e-f15f-40b2-8436-ff43fb0cb0dd'
In my case issue was with “Reader 11.0.01 Update” to get updateID see below image:

SCUP update ID
SCUP update ID

5. After success delete in SCUP I pressed “reactivate” button on affected update – it published successfully!
6. I expired affected update, then published again – and success

I hope that if you face same issue this will be useful for you.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

8 × = forty