Commit problem [message #10922] |
Tue, 24 February 2004 18:40 |
resy
Messages: 86 Registered: December 2003
|
Member |
|
|
hi,
Im facing a problem.
I've a trigger which is getting fired while afteer insertion (statement)of a table.But that parent statement is not getting commited. I do wanna parent insert into be commited before firing the trigger or before trying to do some actions inside my trigger..
any kind of suggestions??thanx.
|
|
|
Re: Commit problem [message #10927 is a reply to message #10922] |
Tue, 24 February 2004 20:21 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
Any DML in a trigger (except for autonomous transactions) is part of the transaction to which the originating statement belongs. There is no way to commit the originating statement before trigger execution.
If it needs to be a separate transaction, than it needs to be called explicitly after you commit.
|
|
|
|
|
|
Re: Autonomous transation? [message #11032 is a reply to message #10935] |
Tue, 02 March 2004 07:57 |
tony martin
Messages: 4 Registered: July 2003
|
Junior Member |
|
|
dear saravanan,
i hav a testimonial abt autonomous transaction a real life saver
every proc or function we write calls a procedure called s_pr_log_error() which basically logs an entry into a table called error log..for eg if an upload of file fails we pass an entry into this table telling which validation has failed. now the prob i had was since the calling proc has failed it will rollback the enitre operation including the entry i pass to error log table using s_pr_log_error.to counter this we declared in the proc s_pr_log_error , PRAGMA AUTONOMOUS TRANSACTION . now even whtever i logged into the error log alone got committed although the calling function or proc had rollbacked its activity. well that did the job
|
|
|