Cannot delete Agent with no references due to references exist error
search cancel

Cannot delete Agent with no references due to references exist error

book

Article ID: 87206

calendar_today

Updated On:

Products

CA Automic Applications Manager (AM)

Issue/Introduction

Error Message :
AwE-5001
Database Query Error
ORA-20170: Can not delete "Agent . 1 references exist"

A references error is thrown after attempting to delete an Agent that does not contain any references.

Investigation

To delete an Agent object, the Agent must be stopped and must not have any references.

However, after meeting these requirements, attempting to delete an Agent throws an error: AwE-5001 Database query error

 

Environment

OS Version: N/A

Cause

Root Cause: Indirect references to not show up as References in the reference list.

Resolution

The following sql statements can be run to find indirect references. Once references are found, remove them within the Java Web Client.

To see if there are any Agent Jobs stuck in the Backlog:

select count(*) from so_job_queue where so_operator='<agent_name>';

To see if any Modules are assigned to the Agent:

select so_module from so_job_table where so_oper_seq=(select so_oper_seq from so_operators where so_oper_name='<agent_name>');

To see if the Agent is used in a Chain Component:

Select so_task_name from so_chain_detail where so_oper_seq=(select so_oper_seq from so_operators where so_oper_name='<agent_name>');

To see if the Agent is used in a Condition:

select a.so_module,so_soc_order condition_order,so_cond_timing condition_timing,so_condition_1||' '||so_qualifier||' '||so_condition_2 condition,
so_action action,so_act_arg action_arguments

from so_object_cond b,so_job_table a
where b.so_object_seq = a.so_job_seq
and b.so_obj_type = 'M'
and b.so_act_arg like '%<agent_name>%';

select * from aw_obj_ref_agent_seq where aw_obj_seq=(select so_oper_seq from so_operators where so_oper_name='<agent_name>');

select * from aw_obj_ref_agent where aw_obj='<agent_name>';



Fix Status: No Fix

Fix Version(s):
N/A

Additional Information

Workaround :
N/A