Unix script to avoid the 'archive directory full' error
Summary
It is therefore better to avoid getting an ORA-00257 archiver error. A monitoring event can be set in the Oracle Enterprise Manager, but here is a simple UNIX script that checks the capacity of the archive directory mount point and sends an email alert if a threshold is reached. A flag file avoids switching again.
sqlplus -s /nolog< /tmp/arcoracle.log
mailx -s "Archive almost full" dba@mycompany.com < /tmp/arcoracle.log
### rm /tmp/arcoracle.log
EOF_SWITCH
touch /tmp/already_switched
fi
Comments
Post a Comment