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.
- Make Sure to take a backup from your WSUS server and WSUS DB.
- Use SQL Management Studio to connect to Windows internal database \.pipeMSSQL$Microsoft##SSEEsqlquery
- We will mainly remove the old records from tbtargetgroupand tbflattenedtargetgroup tables
- Run “select * from tbtargetgroup” to get the list of groups.
- Identify the TargetGroupID of one of the groups that you want to delete
- Run delete from tbflattenedtargetgroup where TargetGroupID = ‘<TargetGroupID for the group which is to be removed>’
- Run delete from tbdeployment where targetgroupid = ‘<Previous step ID>’
- Run delete from tbtargetgroup where TargetGroupID = ‘<Previous same ID>’
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.
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.
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
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.
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.
pos system
I am unable to connect using sql management studio
i am unable to delete a target group
step 5 results:
Msg 547, Level 16, State 0, Line 1
The DELETE statement conflicted with the REFERENCE constraint "FK__tbTargetI__Targe__15A53433". The conflict occurred in database "SUSDB", table "dbo.tbTargetInTargetGroup", column 'TargetGroupID'.
The statement has been terminated.
The query in Point 6 runs right away. However, the subsequent queries are taking forever to run and I have had to cancel them. Are they even required?