BC remote Oracle DBA - Call (800) 766-1884  
Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

   
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 

Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation

 

 


 

 

 

 

 
 

Scheduling and Customizing Oracle
Alert Reports

Oracle Tips by Burleson Consulting

In a UNIX environment, the Oracle Remote DBA can easily control the times when the STATSPACK alert reports are executed. Let’s begin by examining a UNIX crontab file that schedules these reports.

A Sample UNIX Crontab to Schedule Oracle Reports and Alerts

The sample UNIX crontab file that follows is used to schedule STATSPACK reports and alert scripts:

#****************************************************************
# This is the weekly table and index analyze job for the CBO
#****************************************************************
30 7 1 * * /home/analyze.ksh > /home/analyze.lst
#****************************************************************
# This is the weekly (Monday) object analyze and report for management
#****************************************************************
30 7 * * 1 /home/oracle/obj_stat/get_object_stats.ksh prodb1
00 8 * * 1 /home/obj_stat/run_object_report.ksh prodb1
#****************************************************************
# This is the daily STATSPACK exception report for the Remote DBAs
#****************************************************************
30 7 * * * /home/statspack/statspack_alert.ksh prodsid
#****************************************************************
# This is the daily generic alert report for the Remote DBAs
#****************************************************************
00 7 * * * /home/mon/oracheck.run prodsid > /home/mon/o.lst
#****************************************************************
# This is the daily vmstat collector & report for the Remote DBAs and SAs
#****************************************************************
00 7 * * * /home/vmstat/run_vmstat.ksh > /home/vmstat/r.lst
05 7 * * * /home/vmstat/run_vmstat_alert.ksh prodsid > /home/vmstat/v.lst
09 7 1 * * /home/vmstat/run_vmstat_weekly_alert.ksh prodb1
****************************************************************
# This is the daily iostat collector & report for the Remote DBAs and SAs
#****************************************************************
#00 7 * * * /home/iostat/run_iostat_solaris.ksh > /home/iostat/r.lst
#00 7 * * * /home/iostat/run_iostat.ksh prodsid > /home/iostat/v.lst
#****************************************************************
# This is the every 5 min. trace file alert report for the Remote DBAs
#****************************************************************
1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,
53,55,57,59 * * * * /home/mon/trace_alert.ksh prodsid > /dev/null 2>&1
#****************************************************************
# This code ensures that the daemon to check for buffer busy waits
# is always running.
#****************************************************************
30 7 * * * /home/mon/run_busy.ksh > /dev/null 2>&1

We also need to modify these reports to send the information via e-mail to the appropriate person. The alert reports are designed to spool the output to a known filename, and the Remote DBA just needs to modify the commands that send the e-mail alert to customize the recipients’ e-mail addresses.

Let’s look at how it works. The Korn shell code tha follows checks the size of the alert report and mails the report to the Remote DBA if alerts were detected by the script:

var=`cat /tmp/statspack_alert.lst|wc -l`

if [[ $var -gt 1 ]];
   then
   echo       "*********************************************************************"
   echo "There are alerts"
   cat /tmp/statspack_alert.lst|mailx -s "Statspack Alert" \
   don@oracle.com \
   larry_ellison@us.oracle.com \
   james@us.oracle.com
   echo
   *******************************************************************"
 exit


This is an excerpt from "Oracle9i High Performance tuning with STATSPACK" by Oracle Press.


If you like Oracle tuning, you may enjoy the new book "Oracle Tuning: The Definitive Reference", over 900 pages of BC's favorite tuning tips & scripts. 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts.


Expert Remote DBA

BC is America's oldest and largest Remote DBA Oracle support provider.  Get real Remote DBA experts, call
BC Remote DBA today.

 

   

 

Remote DBA Service
 

Oracle Tuning Book

 

Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

 

 

 

 

 

 

BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright © 1996 -  2013 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.



Hit Counter