Download the latest release and uncompress on your unix oracle account home directory. Put all the files in the same directory (/home/oracle/OraAlertCheck for example).
Rename OraAlertCheck_config.sh.sample to OraAlertCheck_config.sh. Edit the file and change the variables to suit your needs. It's important to set the WORKDIR to where the scripts are located.
OraAlertCheck look for your instances on /etc/oratab by default, so if this does not exists you should create it or link it to the real path.
Check to see if the script can find your alert.log files running:
$ ./OraAlertCheck.sh test
You should see the ORACLE_SID followed by the alert.log path. If you can't and you discover a bug in the program, let me know, if it does then skip to the next paragraph. The script connects to the database "/ as sysdba" to get the value of the background_dump_dest parameter (where alert_SID.log file should be). Sometimes this parameter has characters like "?" to indicate the ORACLE_HOME. Be sure to have the full path there.
Now that the log file was found you can run the script with no parameters. NOTE: Since it's the first time, it will run through all your log file and email you with a lot of errors. The script will generate a hidden file where it will set the current line number so next time it will start just where it finished.
If all worked fine, you can add the script to your crontab, every five minutes should be fine.
The script needs some work yet so please don't hesitate to send me your opinions.
NOTE: We need your help!!! In order to develop a good error detection we need every DBA using this script to send new errors that the script does not have. So please send us every error you find! You can email me to newalertlogerrors (at) jluis.com.ar
Saturday, February 12, 2005
Why Korn shell??
I've choose korn shell becouse it's considered the "standard" shell of Unix, and it's available by default on most *nix systems, so no extra things needs to be installed on your server.
Friday, February 11, 2005
OraAlertCheck 0.1 is out!
Well, today I decide to get these scripts out. There are three files, you should only edit the config file and rename it. Put it in /etc or /home/user/etc. The other two can go anywhere, but be sure to complete the right parameters in the config file.
You can use it from the crontab by calling the main script. You can add a "test" parameter in the call to see which instances it has detected and where the alert log will be search. Instance detection is done through /etc/oratab.
Still they need some work, but they are functional. I've been testing it on HP-UX and Oracle 8.0.5, but it should work on any kourne shell *nix.
You can use it from the crontab by calling the main script. You can add a "test" parameter in the call to see which instances it has detected and where the alert log will be search. Instance detection is done through /etc/oratab.
Still they need some work, but they are functional. I've been testing it on HP-UX and Oracle 8.0.5, but it should work on any kourne shell *nix.
Subscribe to:
Posts (Atom)