Data Guard Broker (DGMGRL) can connect to database using following options:
-echo
-silent
-xml
-debug
-logfile
So if I need to run dgmgrl command in debug mode I would execute following :
dgmgrl -debug / or
-bash-3.2$ dgmgrl -debug sys/secret@test
DGMGRL for Linux: Version 11.2.0.1.0 - 64bit Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
[W000 01/05 12:27:03.81] Connecting to database using test.
[W000 01/05 12:27:03.85] Executing query [select dbms_drs.dg_broker_info('VERSION') from dual].
[W000 01/05 12:27:03.86] Query result is '11.2.0.1.0'
Connected.
or dgmgrl -debug / shutdown command will shutdown instance ,generate trace file and then exit.
If Data Guard Broker is used then tracing can be enabled using DGMGRL command
and setting property LogArchiveTrace to value other than 0.
/** Tracing primary site **/
DGMGRL> edit database ‘primary_db_name’ set property LogArchiveTrace=’1′;
/** Tracing standby site **/
DGMGRL> edit database ‘standby_db_name’ set property LogArchiveTrace=’1′;
Also this parameter can be set by issueing a SQL statement :
SQL> ALTER SYSTEM SET LOG_ARCHIVE_TRACE=1;
Values are described in table bellow:
Level Meaning
0 Disables archived redo log tracing (default setting)
1 Tracks archiving of log files
2 Tracks archive status by archive log file destination
4 Tracks archive operational phase
8 Tracks archive log destination activity
16 Tracks detailed archive log destination activity
32 Tracks archive log destination parameter modifications
64 Tracks ARCn process state activity
128 Tracks FAL server process activity
256 Tracks RFS Logical Client
512 Tracks LGWR redo shipping network activity
1024 Tracks RFS physical client
2048 Tracks RFS/ARCn ping heartbeat
4096 Tracks real-time apply activity
8192 Tracks Redo Apply activity (media recovery or physical standby)