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: sending an email from a table trigger (before inserting row)

Re: sending an email from a table trigger (before inserting row)

From: Tim X <timx_at_spamto.devnul.com>
Date: 07 Jul 2003 18:24:17 +1000
Message-ID: <871xx2d9se.fsf@tiger.rapttech.com.au>


>>>>> "Jon" == Jon <aaa_at_bbb.ccc> writes:

 Jon> I would like to know if it is posible to create a table trigger
 Jon> (before inserting a row) so I can send an email directly from
 Jon> the trigger after doing some checking to the data that is going
 Jon> to be inserted. thanks

Yes, you CAN do it, but don't.

  1. sending mail can be a slow operation and this could be a severe bottleneck to performance.
  2. What happens if the insert is rolled back - you cannot rollback the e-mail.

Either write the info to a table and then have a job (DBMS_JOB?) periodically query this table and send the e-mail and remove the row or possibly just create a dbms job and have it send the e-mail.

Tim

-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!
Received on Mon Jul 07 2003 - 03:24:17 CDT

Original text of this message

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