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.