Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Using insert statements in triggers and functions

Using insert statements in triggers and functions

From: Paulos <Nospam_at_none.com>
Date: Tue, 12 Jul 2005 20:29:49 +0200
Message-ID: <42d40c23@news.vo.lu>


I have writen a procedure that logs certain events and I want call the proc from other procedures, from functions and from triggers.

something along the lines of :

Insert into Logtable
(Msg, Tstamp) values('whatever', sysdate);
commit;

Calling it from SPs is no problem, done and working. However if I try to call it from a trigger, I get an error message saying that I can't commit from inside a trigger but if I remove the commit, then a commit is not
(necessarily) executed and the data does not appear. I can't call an SP from
a function so that is also a problem.

I guess this is a very common problem and I can't believe I haven't come across it before and found a solution as I been working with Oracle for a few years now, but there you go!

Would DBMS.JOB do it?

Would be grateful for anyones help on this one.

TIA P Received on Tue Jul 12 2005 - 13:29:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US