Issue: Cannot delete Agentless Managed Systems from Operations Manager 2007
Symptom: Agentless systems cannot be removed from the Operations Console -> Administration -> Agentless managed node. Errors generated in the Operations Event log when the attempted delete occurs
Data Access Layer rejected retry on SqlError: Request: p_ManagedEntityInsert — (BaseManagedEntityId=e7b2cdaa-9a6f-1fba-c2ab-e9eb85bddd80), (TypeManagedEntitId=e7b2cdaa-9a6f-1fba-c2ab-e9eb85bddd80), (ManagedTypeId=02c5162c-b89f-1d61-349a-9b0667fbd60e), (FullName=Microsoft.Windows.Server.AD.ConnectionObject.Odyssey.com;ODYSSEY\ASCENSION), (Path=Odyssey.com), Name=(ODYSSEY\ASCENSION), (TopLevelHostEntityId=292f6a2e-6f02-89c0-ba17-2037b6427b04), (DiscoverySourceID=eada0326-173c-cb83-4aed-8845d7f8f650), (HealthServiceEntityID=7edb784f-b59c-e7b0-e82a-cc96cc355c38), (PerformanceHealthServiceCheck=True), (TimeGenerated=5/31/2007 11:31:53 PM), (RETURN_VALUE=1) Class:16 Number:77980008 Message: Health service ( 7EDB784F-B59C-E7B0-E82A-CC96CC355C38 ) should not generate data about this managed object ( E7B2CDAA-9A6F-1FBA-C2AB-E9EB85BDDD80 ).
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Cause: Configured Agentless monitoring for a domain controller (used to monitor until the service pack could be updated), and then installed an agent on the domain controller when it was available via a manual installation.
Resolution: Updated the row in the BaseManagedEntity table for the agentless system that would not delete to have a value of IsDeleted=1. Deleted rows from the DiscoverySourcetoTypedManagedEntity for the system that would not delete.
Detailed Resolution: The standard caveat on this; this may not be a supported change but it was the only way we could get the system to be monitored again with an agent.
- From the Operations Event log for the DataAccessLayer source/eventid 3333 locate the unique identifier from the message (highlighted in BOLD in the error message above)
- Log into SQL Server Management Studio and take the follow query; run it to validate that a single row is correct and that the Name field matches the expected Agentless system name:
SELECT * FROM dbo.[BasemanagedEntity] where BaseManagedEntityID=’<# from event log here>’
- Then update the value of the IsDeleted column from 0 (which it was in our case in Step 2 above) and change it to 1.This causes it to disappear from the Agentless section.
SET IsDeleted = 1
where BaseManagedEntityID=’<# from event log here>’
- Remove rows from the dbo.DiscoverySourceToTypedManagedEntity table corresponding to the number in the event log.To Find the rows:
select * from dbo.DiscoverySourceToTypedManagedEntity where TypedManagedEntityID=’<# from event log here>‘
To delete the discovery source to typed managed entity rows:
delete from dbo.DiscoverySourceToTypedManagedEntity where TypedManagedEntityID=’<# from event log here>’
To validate the rows no longer exist exist, run the following query. It should not return any data:
select * from dbo.DiscoverySourceToTypedManagedEntity where TypedManagedEntityID=’<# from event log here>’
- Log back into the Operations Console -> Administration -> Device Management -> Agentless management node and refresh. This removes the agentless system that we had previously been unable to delete from this screen
- Approve the Manual Agent install under Pending Management when it appears (probably will need to refresh to see this change)
- Within the Monitoring node, validate that the system is listed and has status for the agent.
- Wait for the agentless configuration to reappear in the Operations Console -> Administration -> Device Management -> Agentless management node.
- Delete the system from the Agentless managed area (works this time!). This removes both the Agentless and Agent configuration for the system
- Redeploy the agent using the Discovery wizard, choosing Agent instead of Agentless.
- Validate that the system now appears under the Agent managed node and does not appear under either Agentless Managed or Pending Management.
Lesson learned: Don’t use Agentless monitoring on a domain controller and then manually install it with an agent 🙂
UPDATE: Maarten Goet (from TechLog) found some of this useful when an agent could not be uninstalled or deleted. Details are available at: http://www.techlog.org/archive/2008/07/29/stale_computer_objects_in_oper