How to turn on debug/trace when running RMAN?

 

Using the debug option one can turn on trace information, this can be used to troubleshoot an issue.

Example:
$ORACLE_HOME/bin/rman target / debug trace=/tmp/rman.log

— Log file
$ head -20 /tmp/rman.log

Recovery Manager: Release 10.2.0.1.0 – Production on Sun Nov 28 01:46:22 2010

Copyright (c) 1982, 2005, Oracle. All rights reserved.

ORACLE_HOME = /u01/oracle/product/10.2.0/db_1
System name: Linux
Node name: localhost.localdomain
Release: 2.6.9-67.0.7.EL
Version: #1 Sat Mar 15 06:19:46 EDT 2008
Machine: x86_64

Starting with debugging set to level=9, types=ALL

DBGMISC: ENTERED krmksimronly [01:46:22.662]

DBGSQL: EXEC SQL AT CHANNEL IMMEDIATE/PREPARE alter session set events ‘19737 trace name context forever’ [01:46:22.663]
DBGSQL: sqlcode=0 [01:46:22.665]
……..
……..