Data Dictionary   «Prev 

Sending alert output to the DBA

This feature allows the DBA to drill down into important Oracle performance areas including
  1. instance efficiency,
  2. SQL response time,
  3. SGA pool wastage, and
  4. wait bottlenecks.

There is more to the data collection than instance-wide metrics and OEM can be customized to send alerts for whatever combination of metric values desired.

In this example, we have spooled the output from our script to /tmp/oracheck.ora. The first IF statement will be true if this file contains more than one line of output.

SMTP Alert: If errors exist, then we invoke a UNIX script called console_alert to send an on-screen message to our operators so they know about the error. This is useful if the alert happens at night when the DBA many not see the email.
Email Alert: We send the DBA an alert email. Note that we use the UNIX 'cat' command to list the file and we pipe the file as input to the mail command. Our email has the subject line $ORACLE_SID alert detected and is sent to all DBAs who are defined in the $dba variable.