Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trigger problem - ORA-04098
Edward Baggott <NoJunkMail_at_GetLost.net> wrote in article
<ZOxrZihv8GA.171_at_news2.ingr.com>...
> I am writing an OCI application that creates tables and also creates
> triggers on the tables, such that an insert causes an event to
> be logged. The application later does inserts, which are supposed
> to cause the trigger to fire.
>
> However, the inserts fail with the error
>
> "ORA-04098: trigger 'NEWTABLE_IT' is invalid and failed re-validation"
>
> If I submit the same insert from an SQL prompt (after the application
> has created the trigger) I also get this error.
>
The state of a trigger can become INVALID if some of the tables etc which
are refered in the trigger code are dropped and recreated. You need to
recreate the trigger again and this would make it VALID again. Spool your
trigger code from user_triggers and try recreating. See if the any errors
are displayed during creation. If no errors are found then try your
inserts again and everything should be OK.
Good Luck.
Sreeni