sqlplus -prelim “/as sysdba”
SQL> ORADEBUG SETORAPNAME DIAG
ORACLE PID: 7, UNIX PROCESS PID: 24593, IMAGE: ORACLE@MRPGTESTDB01 (DIAG)
SQL> ORADEBUG SETOSPID 24593
SQL> ORADEBUG DUMP HANGANALYZE 3
SQL> ORADEBUG TRACEFILE_NAME
/u01/app/oracle/diag/rdbms/tstrms/tstrms/trace/tstrms_diag_24593.trc
SQL> OORADEBUG SETMYPID
SQL> OORADEBUG UNLIMIT
SQL> OORADEBUG DUMP SYSTEMSTATE 266
SQL> OORADEBUG DUMP SYSTEMSTATE 266
SQL> OORADEBUG TRACEFILE_NAME
SQL> exit
Disconnected from ORACLE
SQL> ORADEBUG SETORAPNAME DIAG
ORACLE PID: 7, UNIX PROCESS PID: 24593, IMAGE: ORACLE@MRPGTESTDB01 (DIAG)
SQL> ORADEBUG SETOSPID 24593
SQL> ORADEBUG DUMP HANGANALYZE 3
SQL> ORADEBUG TRACEFILE_NAME
/u01/app/oracle/diag/rdbms/tstrms/tstrms/trace/tstrms_diag_24593.trc
SQL> OORADEBUG SETMYPID
SQL> OORADEBUG UNLIMIT
SQL> OORADEBUG DUMP SYSTEMSTATE 266
SQL> OORADEBUG DUMP SYSTEMSTATE 266
SQL> OORADEBUG TRACEFILE_NAME
SQL> exit
Disconnected from ORACLE