How to Manually Delete Old/Empty WSUS computer Group from Database

Posted by Ahmed Nabil In | 5 comments»
Recently i was trying to delete/Remove one of the old computer groups under WSUS Console - Computers - All Computers. This Group was an old group with no members/Clients or any pending approvals any more. I tried removing it from the GUI by Right licking the object and Delete but the server hanged and i got connection error as shown below.

This problem might occur in WSUS servers utilizing the internal DB which has several limits and with the huge number of updates and many groups you can face such issue.

To solve this problem and manually remove this Group you will need to work it from the database and edit couple of tables as follows:

  1. Make Sure to take a backup from your WSUS server and WSUS DB.
  2. Use SQL Management Studio to connect to Windows internal database \\.\pipe\MSSQL$Microsoft##SSEE\sql\query
  3. We will mainly remove the old records from tbtargetgroup and tbflattenedtargetgroup tables
  4. Run “select * from tbtargetgroup” to get the list of groups.
  5. Identify the TargetGroupID of one of the groups that you want to delete
  6. Run delete from tbflattenedtargetgroup where TargetGroupID = ‘<TargetGroupID for the group which is to be removed>’
  7. Run delete from tbdeployment where targetgroupid = ‘<Previous step ID>
  8. Run delete from tbtargetgroup where TargetGroupID = ‘<Previous same ID>’

This should take care of the deletion of these groups. Again its always required to ensure you have full backup from your DB.



Scott Brickey Says:

Pretty sure Microsoft will stop supporting you if they ever find out that you manipulated THEIR database. I say this knowing that this is the same policy that MS applies to other products like SharePoint and TFS... it is a reasonable assumption that it'll apply to WSUS (or SCOM/SCCM/SCSM/etc) as well.

Ahmed Nabil Says:

This is not manipulation. Its just performing the operation that failed from GUI to Express resource limitation directly from the SQL. These SQL commands were recommended by Microsoft Support team.

Hrodoy Khan Says:

Our Exchange Server Support Team provides emergency support and assistance. Our Exchange Server experts can log
on remotely to diagnose and fix just about any problem you may be experiencing, 24×7. Today’s advanced remote
desktop tools, which are included with Microsoft Windows Server OS, allow us to rapidly support Microsoft Exchange
just as if we were at your place of business.
Emergency Exchange Support
Emergency Exchange Remote Support

lee woo Says:

The purpose of education is to replace an empty mind with an open one. See the link below for more info.


Scotty McKenzie Says:

If you don't want to manipulate the WSUS DB directly, you can accomplish this the long way:
1. Create a new Update View
2. Choose "Updates are approved for a specific group..." (then select the group of course)
3. In the update view, choose Approval: Approved, Status: Any
4. Select all > right click > Approve... > find the group and choose "Same as Parent" > Ok
5. Delete the group as per normal

Personally, I use a powershell script to do this which also cycles through subgroups.

Post a Comment