Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Is there any way to Mail , when a new record is inserted.
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 ChopraReceived on Thu Jan 15 1998 - 00:00:00 CST