[COMPOUND TRIGGER ORA-04098] Compound trigger invalid..
Hi all guys,
i'm making a compound trigger that inserts a row in a table after an insert or an update on another table.
this is the code:
CREATE OR REPLACE TRIGGER prova_trigger
FOR INSERT
ON ui_menu
COMPOUND TRIGGER
AFTER STATEMENT IS
BEGIN
INSERT INTO UI_MENU_INTEGRITY
VALUES
(:NEW.SZURL, :NEW.SZTYPE, :NEW.BAVAILABLE,
:NEW.SZLOCALE, 'asd', :NEW.LPARENTID);
END AFTER STATEMENT;
END prova_trigger;
/
when i try to add a row to ui_menu table i got an "ora-04098 trigger is invalid and failed re-validation" error.
i then tried
"select object_name
from dba_objects
where object_type = 'TRIGGER'
and status = 'INVALID';"
and obviously i got that only "prova_trigger" is an invalid trigger.
i really don't know why it can be invalid, it's very simple. maybe something with permissions?