Wednesday, June 11, 2008


 oradebug help
HELP [command] Describe one or all commands
SETMYPID Debug current process
SETOSPID ospid Set OS pid of process to debug
SETORAPID orapid ['force'] Set Oracle pid of process to debug
SHORT_STACK Dump abridged OS stack
DUMP dump_name lvl [addr] Invoke named dump
DUMPSGA [bytes] Dump fixed SGA
DUMPLIST Print a list of available dumps
EVENT text Set trace event in process
SESSION_EVENT text Set trace event in session
DUMPVAR p|s|uga name [level] Print/dump a fixed PGA/SGA/UGA DUMPTYPE
/name/p|s|uga/text/text/lvl/dump_name/orapid/ospid address type count Print/dump an address with type info
SETVAR p|s|uga name value Modify a fixed PGA/SGA/UGA PEEK addr len [level] Print/Dump memory
POKE addr len value Modify memory
WAKEUP orapid Wake up Oracle process
SUSPEND Suspend execution
RESUME Resume execution
FLUSH Flush pending writes to trace CLOSE_TRACE Close trace file
TRACEFILE_NAME Get name of trace file
LKDEBUG Invoke global enqueue service
SGATOFILE sga dump="" dir="" Dump SGA to file
DMPCOWSGA sga dump="" dir="" Dump & map SGA as COW
MAPCOWSGA sga dump="" dir="" Map SGA as COW
HANGANALYZE [level] [syslevel] Analyze system hang
FFBEGIN Flash Freeze the Instance
FFDEREGISTER FF deregister instance from cluster
FFTERMINST Call exit and terminate instance
FFRESUMEINST Resume the flash frozen instance
FFSTATUS Flash freeze status of instance
UNLIMIT Unlimit the size of the trace file
PROCSTAT Dump process statistics

Level 1 – Basic level of trace information.

Level 8 - Level 1 plus the wait events for elapsed times that are more than current CPU timings.

Level 12- All the previous trace level information in addition to all wait event information.

Tracing a session

SQL> oradebug setmypid
SQL> alter session set tracefile_identifier='trace identifier';
SQL> oradebug tracefile_name /home/oracle/trace_file.trc (default location is user_dump_dest)
SQL> oradebug unlimit
SQL> oradebug event 10046 trace name context forever, level 12
SQL> sql statments to trace ......
SQL> sql statments to trace ......
SQL> sql statments to trace ......
SQL> oradebug event 10046 trace name context off
SQL> oradebug tracefile_name /home/oracle/trace_file.trc