Deferred trigger? [message #37091] |
Wed, 16 January 2002 20:50 |
Dmitri Lipodat
Messages: 8 Registered: January 2002
|
Junior Member |
|
|
Can I create in Oracle something like subj. I want to execute some procedure in the same session after every table update/insert or delete (like trigger), but only after changes is committed. Alerts is not good for it because I need one extra session for waiting them.
|
|
|
Re: Deferred trigger? [message #37101 is a reply to message #37091] |
Thu, 17 January 2002 12:05 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
As long as what you want the trigger to do is transactional (not like sending an email or using DDL or dbms_pipe etc) then it shouldn't be necessary to defer it - unless you want to hide the effects of the trigger from your current session which fires the trigger. The results of the trigger wouldn't be visible to other users until your commit too place. A rollback would obviously undo the trugger actions too (as long as they are transactional like DML).
There is a "when logoff" trigger in 8i which is the closest I can think of.
|
|
|
Re: Deferred trigger? [message #37106 is a reply to message #37091] |
Thu, 17 January 2002 21:08 |
Dmitri Lipodat
Messages: 8 Registered: January 2002
|
Junior Member |
|
|
Thx for your answer, but I know how standard triggers work, and I know about transactions. And I also understand, that alerts done by writing some records into system table, but real send of alert occur only when you commit the transaction. I want to make similar mechanism, but in result it will do some action and will not send alert.
DBMS_ALERT is a package, it is written by Oracle, but may be someone know how to create something similar.
|
|
|
|
|