Database Reference
In-Depth Information
export ORACLE_SID=O12C
export ORACLE_HOME=/orahome/app/oracle/product/12.1.0.1/db_1
export PATH=$PATH:$ORACLE_HOME/bin
crit_var=$(
sqlplus -s <<EOF
/ as sysdba
SET HEAD OFF TERM OFF FEED OFF VERIFY OFF
COL value FORM A80
select value from v\$diag_info where name='Diag Trace';
EOF)
if [ -r $crit_var/alert_$instance.log ]
then
grep -ic error $crit_var/alert_$instance.log
if [ $? = 0 ]
then
mailx -s "Error in $instance log file" $MAILLIST <<EOF
Error in $crit_var/alert_$instance.log file on $BOX...
EOF
fi # $?
fi # -r
done # for instance
exit 0
You can easily modify the above to fit the requirements of your environment. For example, you might need to
change the way the Oracle operating system variables are sourced, the databases searched for, the error string,
and the e-mail address. this is just a simple example showing the power of using a shell script to automate the
search for errors in a file.
Recovering After Loss of All Members of Inactive Redo Log Group
If you've lost all members of an inactive redo log group, then perform the following steps:
1.
Verify that all members of a group have been damaged (by inspecting the alert.log file).
2.
Verify that the log group status is INACTIVE .
3.
Re-create the log group with the clear logfile command.
4.
If the re-created log group has not been archived, then immediately back up your
database.
If all members of an online redo log group are damaged, you won't be able to open your database. In this
situation, Oracle will allow you to only mount your database.
First inspect your alert.log file, and verify that all members of a redo log group are damaged. You should see a
message indicating that all members of an online redo log group are damaged and the database cannot open:
ORA-00312: online log 2 thread 1: '/u01/oraredo/O12C/redo02a.rdo'
ORA-00313: open failed for members of log group 2 of thread 1
 
Search WWH ::




Custom Search