Home » Infrastructure » Unix » monitoring oracle database tables from korn shell script and sending e-mail
monitoring oracle database tables from korn shell script and sending e-mail [message #98079] Mon, 26 January 2004 10:42 Go to next message
munna
Messages: 2
Registered: January 2004
Junior Member
I have to write a shell script, which checks for certain values on a table (may be I can use a procedure and return some value). If the select statement return some value, it needs to send e-mail to  members of a team. Please help me.

Thanks a lot
Re: monitoring oracle database tables from korn shell script and sending e-mail [message #98080 is a reply to message #98079] Tue, 27 January 2004 13:46 Go to previous messageGo to next message
William Robertson
Messages: 1643
Registered: August 2003
Location: London, UK
Senior Member
Why a shell script? Wouldn't it be simpler to have a datebase trigger call a 'SEND_MAIL' procedure?
Re: monitoring oracle database tables from korn shell script and sending e-mail [message #98082 is a reply to message #98080] Wed, 28 January 2004 06:02 Go to previous messageGo to next message
munna
Messages: 2
Registered: January 2004
Junior Member
William,

Thanks for the reply. Since the tables are really big ones,I don't want a trigger. Also, I need to schedule a cron job to run fw times a day to monitor the tabls for certain entries. Now, I am thinking about a java program which gets called from a shell script.

Thanks,
Munna
Re: monitoring oracle database tables from korn shell script and sending e-mail [message #98084 is a reply to message #98082] Wed, 28 January 2004 23:49 Go to previous message
William Robertson
Messages: 1643
Registered: August 2003
Location: London, UK
Senior Member
Why shouldn't a big table have a trigger?

In any case the database already has a job scheduler (DBMS_JOB) and the ability to send e-mail (UTL_SMTP) so I'm not sure what added benefit you would get from Java and cron. In fact they would complicate things by needing to connect to the database.
Previous Topic: Oracle 8.1.7 and Sun Solaris 8 - Install Fails
Next Topic: CPU requirements for Oracle on Solaris.
Goto Forum:
  


Current Time: Sat Jan 16 12:08:45 CST 2021