Oracle oradebug command usage
1> what commands are available for oradebug? Log on to the database as sysdba, you can see the Common commands sqlplus/as sysdba oradebug help 2> tracking the current session information oradebug setmypid -- tracking the current session oradebug setospid -- tracking the system process oradebug setorapid -- tracking the ORACLE process oradebug unlimit -- cancel the trace file size limit oradebug tracefile_name -- view the trace file name and location 3> Use oradebug for session-level 10046 or 10053 oradebug setmypid oradebug unlimit oradebug session_event 10046 trace name context forever, level 4 -- enable session level 10046 oradebug event 10046 trace name context off -- disable 10046 event oradebug tracefile_name -- View tracefile file location and file name 4> Use oradebug for oracle process level 10046 oradebug setorapid oradebug unlimit oradebug event 10046 trace name context forever, level 4 oradebug event 10046 trace name context off oradebug tracefile_name 5> oradebug system hang cause analysis if the system HANG, As long as sys users can log on, oradebug setmypid oradebug unlimit oradebug setinst all -- RAC environment oradebug hanganalyze 3 -- the level is generally set to 3 enough for oradebug-g def dump systemstate 10 -- RAC environment oradebug tracefile_name 6> get status information of a process oradebug setospid 22180 oradebug dump processstate 10 route tracefile_name 7> Get process error information status oradebug limit 22180 oradebug dump errorstack 3 8> cause error information reason, for example, ORA-04031 oradebug event 4031 trace name errorstack level 3 9> tracking oracle process sample: oradebug setorapid 120 oradebug unlimit oradebug event 10046 trace name context forever, level 4 oradebug event 10046 trace name context off oradebug tracefile_name