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 -> Is there any way to Mail , when a new record is inserted.

Is there any way to Mail , when a new record is inserted.

From: Johnny Chopra <johnnyc_at_mail.starnet.com.au>
Date: 1998/01/15
Message-ID: <01bd2193$b66abec0$9b8418cb@default>#1/1

Hi Everyone,

I have a requirement that whenever a new record is inserted into a table for e.g. EMP, an e-mail message should be sent to a specific User for e.g. SCOTT.

I tried to write a database trigger (After Insert on EMP) as below:  CREATE OR REPLACE TRIGGER MAIL_NEW_EMP_TRIG  AFTER INSERT
 ON EMP
 BEGIN
        HOST ('/home/scott/mail_new_emp.sh');  END; This work fine when I run from sqlprompt SQL> HOST /home/scott/mail_new_emp.sh

But It does not work from inside trigger. Is there any way to mail when a new record is inserted into a table.

We running oracle 7.3.3 on NCR UNIX and client is windows 95.

NOTE:
( mail_new_emp.sh is a UNIX script.
  The purpose of this script is to mail to the User SCOTT.)

 I will really appreciate all the help and efforts.  Thanks in advance

 If you any solution, then
 Please E-mail me on.

                                johnnyc_at_instinctoz.com.au
                                              OR
                                johnnyc_at_curly.starnet.com.au

-- 
Johnny Chopra
Received on Thu Jan 15 1998 - 00:00:00 CST

Original text of this message

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