I am doing two types of backups using RMAN scripts, one script for databases in ARCHIVELOG mode and the second script for NOARCHIVELOG mode.
To use the NOARCHIVELOG mode script requires that the database be mounted but not open. While running this script the script that shuts down the database and then starts and mounts it did not do it's job properly, so the later RMAN script tried to backup an open database and errored out. I was surprised at this and I have not been able to replicate the problem, but I have a question for you, oh wise forum readers. How can you, in a unix shell script (assume korn shell), check on what the status of a database is (offline, mounted, or open)? There seems to be no command you can run in svrmgrl...
The system is a Compaq Tru64 Unix (AKA DEC/Unix), Oracle 8i, on an dual alpha configuration. We use RMAN scripts for backups and legato networker for tape managment.
Thanks in advance.
You can do it in different ways.
1. Write a shell script, that would trace throgh the alert_sid.log file and post you the results on the database's status.
2. If you are running the oracle tools like OMS, then using OEM you can create events to fire (send you a mail/paging)
if the database is down
For examples on the scripts check oracle magazine site tips, that has a load of scripts that you can make use of.
Life is a journey, not a destination!
Our alert_SID.log file only contains the shutdown abort warnings, and one memory leak alert. I take it that there is a configuration parameter I need to set to log startup and shutdowns, not just shutdown aborts?
Click Here to Expand Forum to Full Width