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: Using a trigger to send an e-mail

Re: Using a trigger to send an e-mail

From: David Mortenson <dmortenson_at_home.com>
Date: Thu, 03 Dec 1998 23:51:56 GMT
Message-ID: <36672368.84149829@news.grnvle1.sc.home.com>


On Thu, 3 Dec 1998 09:39:40 +0100, "Piotr Kolodziej" <pkol_at_otago.gda.pl> wrote:

  So far, I have created a trigger that uses UTL_FILE to create an e-mail formatted text file and have a shell script that pipes all of the text files through sendmail.

  This works o.k., but I would like something more robust and portable to NT. I am thinking of writing a Pro*C daemon to poll the database table directly, to avoid using UTL_FILE and adding error checking and e-mail status updates. Other than responsiveness (immidate action rather than polling), can you think of other reasons to consider DBMS_PIPE?
>David Mortenson wrote in message <3665d58a.159080587_at_news.grnvle1.sc.home.com>...
>>
>> This is probably a common question, but...
>>
>> I need to send an e-mail when a database trigger is fired. I am
>>initially going to be using it on UNIX, but will be using an NT server
>>later on...
>>
>> Any suggestions?
>
>Generally, it is not a good idea to perform any sophisticated actions
>at the trigger level. Better pass a message for example via dbms_pipe
>to the other oracle session which listens and passes requests to the
>external program. On unix, the easiest way may be writting a daemon
>script which weaks up, executes a sql script which looks for requests
>at the Oracle database level (for example by reading a dbms pipe) and
>generates unix script calling mail program with proper messages.
>You may also write /Pro*/C program instead.
>
>Regards,
>Piotr Kolodziej
>pkol_at_otago.gda.pl
Received on Thu Dec 03 1998 - 17:51:56 CST

Original text of this message

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