Which to use: Trigger/Oracle Mail

From: Carmen Iannacone <carmen_at_pni.sra.com>
Date: 4 Oct 1993 17:49:10 GMT
Message-ID: <28pnmm$s5o_at_snoopy.sra.com>


        Hello everyone,

	I'd like to issue an email message to a user (who will
	*NOT* have Oracle, and will not be at my site...) containing
	all the fields of a row after an insert has been made
	into a table.  Depending on a combination of the fields'
	states, a different user would be mailed.  (i.e. given
	SUBJECT is a column, then if new.subject = "Accounting"
	mail Fred, if new.subject = "Receiving" mail Bertha...)

	My question is, is it possible to trigger an OS command
	via a database trigger?  Is Oracle*Mail the tool I want
	to be using?  (I have no experience at all with it, so
	I'm not sure what it does...).

	I'm using 7.0.13.1 on a Sun, and I don't see any "operating
	system command" based trigger stuff in the manuals.  Can
	anyone suggest the "do-ability" of this, and recommend a
	path toward a solution?

	My thanks in advance for any help.

	-Carmen



	One last thought:
	
	There might be a "long way" around the problem by having a 
	polling cron job look in a certain directory say, every
	five minutes, and dump all inserts into flat files there.
	This job would mail people based on what directory it 
	was in.  We'd still need a trigger (I guess) to write the
	rows into individual files though...

	Can a trigger ask the OS for a new file (as a C program
	might) and then write the fields to it?  It strikes me
	that if it could do this, it could do the mailing, but
	perhaps the thought might click with someone...



--
------------------------------------------------------------------------
Carmen Iannacone				(703) 803-1544
Associate Member of the Professional Staff	4300 Fair Lakes Court
SRA Corporation					Suite 250
Fairfax, Virginia				Fairfax, Va. 22033
Received on Mon Oct 04 1993 - 18:49:10 CET

Original text of this message