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
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>';