3

I am stuck in a very unusal problem. There's one trigger I'd like to drop. Now when I drop it, it is dropped successfully.

drop trigger HRCS.hr_external_salary_in_trigger 

But when I run this command then I can see the trigger again:

select * from all_triggers where trigger_name like '%external%'

I can see this trigger in UI of PLSQL developer with red x on its head. Now when I try to delete it from left click menu then I get this error:

Error dropping HRCS.hr_external_salary_in_trigger
ORA-04080: trigger 'HR_EXTERNAL_SALARY_IN_TRIGGER' does not exist

Never saw this kind of behavior. Something which I deleted is still there but the program says it doesn't exist while showing it. o_O

How can I get rid of this undesirable annoyance

Jaanna
  • 1,620
  • 9
  • 26
  • 46
  • Is `HRCS` your current schema? What is the value of the `owner` column your `select from all_triggers` statement returns? – Nick Krasnov Dec 28 '12 at 12:21
  • yes I have tried to delete from hrcs as well as from system – Jaanna Dec 28 '12 at 12:25
  • please provide the result of the `select * from all_triggers where trigger_name like '%external%'` ,specifically `owner` column – Nick Krasnov Dec 28 '12 at 12:27
  • owner: hrcs, trigger_name: hr_external_salary_in_trigger, trigger_type: after each row, triggering_event: insert, table_owner_ hrcs, base_object_type: table – Jaanna Dec 28 '12 at 12:30

2 Answers2

4

Ok, I solved the problem

I used quotation marks as in:

drop trigger HRCS."hr_external_salary_in_trigger"

and it was dropped, finally.

Thanks all for replies :)

Jaanna
  • 1,620
  • 9
  • 26
  • 46
1

Check the dependencies of that trigger using,

select * from dba_dependencies;

Find out if there are any dependencies or not. Check if you have created a synonym for that trigger.

Orangecrush
  • 1,970
  • 2
  • 15
  • 26
Dileep
  • 624
  • 3
  • 10
  • 20