NetIQ Monitoring Policy SQL job failing: DeleteMonitoringPolicy: The knowledge script group applied from control center cannot be removed from OC

  • 7012131
  • 11-Apr-2013
  • 17-Apr-2013

Environment

NetIQ AppManager 7.0.x
NetIQ AppManager 8.0.x

Situation

The NetIQ Monitoring Policy QDB scheduled SQL task is failing with the following error:
 
'DeleteMonitoringPolicy: The knowledge script group applied from control center cannot be removed from OC [SQLSTATE 42000] (Error 50000).'

Resolution

To correct this issue first run the following query against the QDB (repository):
 
select *  FROM dbo.CC_OCMPToDelete A INNER JOIN dbo.MonitoringPolicy B ON B.ObjID = A.ObjID AND B.VirtualKSID = A.VirtualKSID
 
If this returns anything then run the following query against the QDB (repository) to correct the issue:
 
DELETE A FROM dbo.CC_OCMPToDelete A INNER JOIN dbo.MonitoringPolicy B ON B.ObjID = A.ObjID AND B.VirtualKSID = A.VirtualKSID
 
Once this completes then start the NetIQ Monitoring Policy QDB sql job.

Cause

A Monitoring Policy is defined twice and needs to be removed in order for the NetIQ Monitoring Policy QDB scheduled SQL task to be able to complete its maintenance process.