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: Connor McDonald <mcdonald.connor.cs_at_bhp.com.au>
Date: Fri, 04 Dec 1998 18:52:15 +0800
Message-ID: <3667BEDE.F79@bhp.com.au>


David Mortenson wrote:
>
> 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

Check out PLEX at govt.us.oracle.com under downloadable utilities --



Connor McDonald
BHP Information Technology
Perth, Western Australia
"The difference between me and a madman is that I am not mad" Received on Fri Dec 04 1998 - 04:52:15 CST

Original text of this message

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