Oracle Recommended Backup fails with "Unable to perform the backup because the database is closed"

(Doc ID 438005.1)

Last updated on JANUARY 06, 2016

Applies to:

Enterprise Manager Base Platform - Version 10.1.0.4 to 12.1.0.5.0 [Release 10.1 to 12.1]
Information in this document applies to any platform.
***Checked for relevance on 07-Feb-2012***
Checked for relevance on 08-Aug-2013

Symptoms

Attempting to backup a RAC database from Grid Control with the 'Oracle Recommended Backup' fails with 'Unable to perform the backup because the database is closed'. The database is known to be up.

An agent perl trace reveals:

-: Mon Apr 9 21:20:15 2007: DEBUG: db_common.set_env_var(): ORACLE_SID: ORCL<==

-: Mon Apr 9 21:20:15 2007: DEBUG: rman_o.br_get_db_status()
-: Mon Apr 9 21:20:15 2007: DEBUG: rman_o.br_get_db_status() db_username: {admin1}
-: Mon Apr 9 21:20:16 2007: DEBUG: db_common.getFileSize(): Size (Bytes) for file /tmp/6JNtRnW7t8/h4CLcVAf35: 270
-: Mon Apr 9 21:20:16 2007: DEBUG: rman_o.br_prebackup() Database Status: CLOSED
-: Mon Apr 9 21:20:16 2007: ERROR: rman_o.br_prebackup() Unable to perform the backup because the database is closed.

If you capture the contents of the temporary file; you will most likely need to write a script to confirm the error mesage as the temporary file is deleted almost immediately:

You can capture the temp files with the following script.  Re-create your error and kill the script when the job fails.

mkdir $HOME/save_tmp
SAVE_TMP=$HOME/save_tmp

while :
do
   fname=`ls -1tr /tmp| tail -1`
   cp -R /tmp/$fname $SAVE_TMP
done

Check the temp files in $HOME/save_temp to see if you have one like:

SQL*Plus: Release 10.2.0.3.0 - Production on Sun Jun 10 22:09:16 2007
.
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
.
ERROR:
ORA-1034: ORACLE not available
ORA-27101: shared memory realm does not exist
SVR4 Error: 2: No such file or directory

The ORACLE_SID in the trace file is in upper case, the ORACLE_SID are actually in lower case.

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms