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 -> Re: Using insert statements in triggers and functions

Re: Using insert statements in triggers and functions

From: nirav <shivam71_at_gmail.com>
Date: 13 Jul 2005 07:53:59 -0700
Message-ID: <1121266439.804786.121820@g47g2000cwa.googlegroups.com>


Hi,
Just wanted to convey my opinion....

If the procedure does not commit then that should be fine I guess...Why because , the work done by the procedure will be ULTIMATELY commited, when the calling procedure or function commits right?

So it should be fine as it is...

Just my opinion..I am somewhat new...

Nirav

Paulos wrote:
> 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 Wed Jul 13 2005 - 09:53:59 CDT

Original text of this message

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