Automatic Triggers [message #204361] |
Mon, 20 November 2006 05:50 |
mudalimuthu
Messages: 64 Registered: May 2005 Location: Bangalore
|
Member |
|
|
I want to execute one trigger automatically after updating one table delayed by 59 seconds.
say I am updating table t1
after 59 second i want to excecute trig1
is it possible?
regards
Muthu
|
|
|
Re: Automatic Triggers [message #204370 is a reply to message #204361] |
Mon, 20 November 2006 06:26 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Yes, sort of.
If you want the code in the trigger to have the option of rolling back the Insert, then No, you can't do it.
You could create a trigger that would create a DBMS_JOB that would run at approximately 1 minute from now, and get this job to do the work that you want, but it will be executing in a completely different session, and will know nothing about the statment that triggered it.
|
|
|
Re: Automatic Triggers [message #204596 is a reply to message #204361] |
Tue, 21 November 2006 06:21 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
What are you trying to achieve with that. Maybe you can get that in another way you didn't think of.
I for me cannot think of a logical need for this.
|
|
|
Re: Automatic Triggers [message #204647 is a reply to message #204596] |
Tue, 21 November 2006 08:48 |
MarcL
Messages: 455 Registered: November 2006 Location: Connecticut, USA
|
Senior Member |
|
|
The business case would be interesting to hear.
But I believe you can use a dbms_lock.sleep(59) which would hold the procedure for 59 seconds. But again, why would you ever want to do this ?
Marc
[Updated on: Tue, 21 November 2006 08:48] Report message to a moderator
|
|
|
|