Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PLSQL: sending email method?
David,
Here is an example of a plsql procedure which sends email from the database
if there is a problem with an Advanced Replication setup:
http://www.dotcomsolutionsinc.net/products/repgen/repgen_example_repcheck_md
ef1.html
This procedure requires an Oracle 8.1.6 database version (or higher), in order to make use of the UTL_SMTP package from Oracle.
Another method which could be used is to not use the Oracle database to send the email directly. The following Perl program queries primary and standby databases and makes use of the Mail::Sendmail Perl module to send an email if the standby database is not keeping up with the Primary database: http://www.dotcomsolutionsinc.net/products/installgen/installgen_win901_79_. html
You may download a demo version of Repgen or Installgen in order to create
the same demo scripts you see on the web site. You can then modify these
scripts for your own use if you like:
http://www.dotcomsolutionsinc.net/downloads/demo_software/index.html
David Simpson
www.dotcomsolutionsinc.net
"David Van Zandt" <dvanzandt_at_iquest.net> wrote in message
news:ld%D8.601$L4.166880_at_news1.iquest.net...
> Here's one not in the books: I'm trying to write PL/SQL to periodically
> query a user table for its row count, which is normally zero; if the
result
> is greater than a certain integer, then send an email to an operator to
take
> corrective action. Basic function and procedure stuff -- except for that
> last part; I'm clueless. I'm used to writing a Korn shell to launch
> SQLPlus, then calling mailx to alert the operator.
>
> Oh, and I'm trying to have this run using DBMS_JOB.
>
> Can anyone help the poor boy, please?
>
>
>
Received on Sun May 19 2002 - 17:47:08 CDT
![]() |
![]() |