Enabling debugging in RMAN
Debugging/monitoring can be performed to obtain more detailed information about RMAN processes. This allows us to gain more insight than just the error message in the log file.
Usage:
rman target / debug trace=/tmp/rman.log
It is used as follows:
oracle@orcldb01 ~]$ rman target / debug trace=/tmp/rman.log
Recovery Manager: Release 12.2.0.1.0 - Production on Thu Nov 7 17:27:18 2019
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
RMAN-06005: connected to target database: ORCL (DBID=493182109)
RMAN>
The contents of the /tmp/rman.log file in the example above will be similar to the following :
Recovery Manager: Release 12.2.0.1.0 - Production on Thu Nov 7 17:27:18 2019
Copyright (c) 1982, 2017, Oracle and/or its affiliates. All rights reserved.
ORACLE_HOME: /u01/app/oracle/product/12.2.0.1/dbhome_1
System name: Linux
Node name: orcldb01.interiva.com
Release: 4.1.12-61.33.1.el6uek.x86_64
Version: #2 SMP Tue Mar 14 13:16:51 PDT 2017
Machine: x86_64
Starting with debugging set to level=9, types=ALL
DBGMISC: ENTERED krmksimronly [17:27:18.166]
DBGSQL: CHANNEL> alter session set events '19737 trace name context forever'
DBGSQL: sqlcode = 0
DBGSQL: CHANNEL> select decode(archiver, 'FAILED', 1, 0) into :archstuck from v$instance
DBGSQL: sqlcode = 0
DBGSQL: D :archstuck = 0
DBGSQL: CHANNEL> alter session set events '19737 trace name context off'
DBGSQL: sqlcode = 0
DBGMISC: EXITED krmksimronly [17:27:18.168] elapsed time [00:00:00:00.001]
DBGSQL: CHANNEL> select sys_context('userenv', 'con_id'), sys_context('userenv', 'cdb_name'), sys_context('userenv', 'con_name')
, case when sys_context('userenv', 'is_application_root') = 'YES' then 1 else 0 end into :pdbid, :cdbname, :pdbname, :approot from d
ual
DBGSQL: sqlcode = 0
DBGSQL: D :pdbid = 0
DBGSQL: D :cdbname = NULL
DBGSQL: D :pdbname = ORCL
DBGSQL: D :approot = 0
DBGMISC: ENTERED krmksimronly [17:27:18.197]
DBGMISC: EXITED krmksimronly [17:27:18.197] elapsed time [00:00:00:00.000]
DBGSQL: CHANNEL> select sys_context('userenv', 'con_id'), sys_context('userenv', 'cdb_name'), sys_context('userenv', 'con_name')
, case when sys_context('userenv', 'is_application_root') = 'YES' then 1 else 0 end into :pdbid, :cdbname, :pdbname, :approot from d
ual
DBGSQL: sqlcode = 0
DBGSQL: D :pdbid = 0
DBGSQL: D :cdbname = NULL
DBGSQL: D :pdbname = ORCL
DBGSQL: D :approot = 0
DBGMISC: ENTERED krmkgetdb [17:27:18.204]
DBGRPC: krmxcc - entering
DBGRPC: krmxcc - creating context for channel No-chid
DBGRPC: krmxcc - connecting using target default channel
DBGRPC: krmxcc - setting up for out-of-band
DBGRPC: krmxpos - setting up channel No-chid
DBGRPC: krmxpos - creating polling channel for channel No-chid
DBGMISC: ENTERED krmksimronly [17:27:18.234]
DBGMISC: EXITED krmksimronly [17:27:18.234] elapsed time [00:00:00:00.000]
DBGSQL: CHANNEL> select sys_context('userenv', 'con_id'), sys_context('userenv', 'cdb_name'), sys_context('userenv', 'con_name'
), case when sys_context('userenv', 'is_application_root') = 'YES' then 1 else 0 end into :pdbid, :cdbname, :pdbname, :approot from
dual
.
.
.
.
.
.
.
.










