Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Trigger and Job (DDL)
Hi_at_all,
I have the following problem:
After an insert on my table a trigger calls some procedures calculating a value. If this is below a given value, an email is sent using the smtp-package. Everything is working fine so far.
But in some rare cases, there's a very short time (some seconds) between two insert-statement, which causes an email is sent and a moment later the value is ok again (e.g. value= -2 => email, after the next insert two sec later, value = +3 => no email!)
How can I delay the procedure testing the value for some 20 seconds or so? I tried already the to DBMS_LOCK.SLEEP ( 20) but this changed nothing except the whole thing is finished 20 secs later.
Next idea was let the trigger create a one-time-job an start this 20 secs later => is not working, because a trigger is not allowed to execute a DDL - Statement, right?
Does anybody has got an idea how to find a workaround for this problem?
Thanx
flo Received on Thu Aug 10 2006 - 12:50:48 CDT