oradebug
Select Process
oradebug setmypid
oradebug setospid pid
oradebug setorapid pid
selects the current process as the ORADEBUG process
selects the specified OS process
selects the specified Oracle process
Tracefile Management
oradebug unlimit
oradebug tracefile_name
remove size limit of the trace file (redundant after 8.1.6)
returns name and path of tracefile
Process Management
oradebug suspend
oradebug resume
suspends selected process (don't use with setmypid)
reumes selected process
You can achieve the same using OS level commands...
Linux...
kill -sigstop $SPID
kill -sigcont $SPID
suspends selected process
reumes selected process
AIX...
kill -17 $SPID
kill -19 $SPID
suspends selected process
reumes selected process
Hanganlayze
oradebug hanganalyze 3
Dump
oradebug dumplist
oradebug dump systemstate 266
oradebug dump ashdumpseconds 30
list of possible dumpnames
level 266 dump of systemstate
dump latest 30 seconds of ASH data (needs Diagnostic Pack license!)
Trace
Example...
oradebug session_event 10046 trace name context forever, level 12
Bibliography
hanganalyzehttps://www.dbi-services.com/blog/oracle-is-hanging-dont-forget-hanganalyze-and-systemstate/https://grepora.com/2016/12/14/hanganalyze-part-1/https://grepora.com/2016/12/21/hanganalyze-part-2/
systemstatehttps://grepora.com/2017/01/04/systemstate-dump/
https://support.oracle.comTroubleshooting Database Hang Issues (Doc ID 1378583.1)How to Collect Diagnostics for Database Hanging Issues (Doc ID 452358.1)Troubleshooting Database Contention With V$Wait_Chains (Doc ID 1428210.1)EVENT: HANGANALYZE – Reference Note (Doc ID 130874.1)Important Customer information about using Numeric Events (Doc ID 75713.1)Reading and Understanding Systemstate Dumps (Doc ID 423153.1)