| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: enabled trigger doesn't fire
I have administrator rights on the database, so I don't think it has to do
with user rights. What I am really testing is an application that does
inserts in a table which has a trigger that should insert into another
table. I know the application is doing this correctly, but I have also
checked it by manually inserting via SQL Plus Worksheet doing commit without
any more success. The trigger does not have any exception handling. (It is
very straightforward, it is highly unlikely that the triggered insert should
fail if the original insert worked.) Just as an experiment I made two new
identically defined tables (just two columns) and made a lame trigger which
would insert the same in the second table on insert in the first. I could
not even get this to work. I inserted into table1, but nothing happended
with table2.
"Can" <no_at_spam.net> wrote in message
news:T%W%c.257350$vG5.42900_at_news.chello.at...
> "Richard Gjerde" <richard_gjerde_at_yahoo.no> schrieb im Newsbeitrag
> news:wWV%c.8600$g%5.89938_at_news2.e.nsc.no...
> > Thanks for the response Can. But there is nothing wrong with the
trigger.
> It
> > is working fine on the production database, and since the database I am
> > working on is an exact copy, the trigger is the same. However, it
doesn't
> > fire even though it (look like) it is activated.
>
> Hmm, if you think the trigger is disabled, you need to execute:
> ALTER TABLE tablename ENABLE TRIGGER triggername;
>
> Possible solution:
> If I recall correctly, statements need to be commited before the trigger
> fires.
> So - did you execute a commit upon the insert statement?
>
>
> I know you're saying that db is a 100% exact copy, but if it were, the
> trigger should fire.
> Maybe you don't have permissions to write into that table.
> If there's an exception in the trigger code, and this exception is
> caught/handled, then your insert on the first table will still work,
whilst
> the second table will stay unaffected. So even, if the row is inserted in
> the first table, this need not mean your trigger is disabled - it still
can
> be enabled, but just be throwing an unhandled exception.
>
>
> Can Oezdemir
>
>
Received on Thu Sep 09 2004 - 07:31:10 CDT
![]() |
![]() |