Interpreting Oracle RMAN Message Output


        The RMAN command output contains actions that are relevant to the RMAN job as well as error messages that are generated by RMAN, the server, and the media vendor. RMAN error messages have an RMAN-nnnn prefix. The output is displayed to the terminal (standard output) but can be written to a file by defining the LOG option or by shell redirection.


        The RMAN trace file contains the DEBUG output and is used only when the TRACE command option is used.
        The alert log contains a chronological log of errors, nondefault initialization parameter settings, and administration operations. Because it records values for overwritten control file records, it can be useful for RMAN maintenance when operating without a recovery catalog.
        The Oracle trace file contains detailed output that is generated by Oracle server processes. This file is created when an ORA-600 or ORA-3113 (following an ORA-7445) error message occurs, whenever RMAN cannot allocate a channel, and when the Media Management Library fails to load. It can be found in USER_DUMP_DEST.
        The sbtio.log file contains vendor-specific information that is written by the media management software and can be found in USER_DUMP_DEST. Note that this log does not contain Oracle server or RMAN errors.

Using the DEBUG Option
        The DEBUG option is used to:
        View the PL/SQL that is generated
        Determine precisely where an RMAN command is hanging or faulting
        The DEBUG option is specified at the RMAN prompt or within a run block.
        The DEBUG option creates an enormous amount of output, so redirect the output to a trace file:

$      rman target / catalog rman/rman debug trace trace.log

        The DEBUG option displays all SQL statements that are executed during RMAN compilations and the results of these executions. Any information that is generated by the recovery catalog PL/SQL packages is also displayed. In the following example, the DEBUG output is written during the backup of data file 3, but not data file 4:

RMAN> run {
      debug on;
      allocate channel c1 type disk;
      backup datafile 3;
      debug off;
      backup datafile 4; }

        Remember that the DEBUG output can be voluminous, so make sure that you have adequate disk space for the trace file. This simple backup session that does not generate any errors creates a trace file that is almost half a megabyte in size:
        $ rman target / catalog rman/rman debug trace sample.log
        RMAN> backup database;
        RMAN> host "ls –l sample.log";

Interpreting RMAN Error Stacks
Because of the amount of data that RMAN logs, you may find it difficult to identify the useful messages in the RMAN error stack. Note the following tips and suggestions:

        Because many of the messages in the error stack are not meaningful for troubleshooting, try to identify the one or two errors that are most important.
        Check for a line that says Additional information followed by an integer. This line indicates a media management error. The integer that follows refers to code that is explained in the text of the error message.
        Read the messages from bottom to top because this is the order in which RMAN issues the messages. The last one or two errors that are displayed in the stack are often informative.
        Look for the RMAN-03002 or RMAN-03009 message immediately following the banner. The RMAN-03009 is the same as RMAN-03002 but includes the channel ID. If the failure is related to an RMAN command, then these messages indicate which command failed. The syntax errors generate an RMAN-00558 error.