ORADEBUG - UNDOCUMENTED ORACLE UTILITY
By
Miladin Modrakovic
rankoni@hotmail.com
Introduction
This document describes Oracle utility called oradebug. This tool is primarily used by Oracle
worldwide customer support .With oradebug utility you can literally see the database engine. The
oradebug is especially useful when things go very bad - e.g. the database just stops, hangs, or the
database keeps crashing with the ORA-0600 error! To run this tool you must have administrator
privileges.
Among the many useful things that can be done with oradebug are:
- enabling/disabling the SQL tracing for another user's session.
- suspending intensive processes
- finding information about shared memory and semaphores
- closing the trace file so that new one can be generated
- manipulating and dumping internal structures
- wake up processes etc.
Oradebug Commands
The oradebug utility consists of the following commands:
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
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 variable
SETVAR <p|s|uga> <name> <value> Modify a fixed PGA/SGA/UGA variable
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 file
CLOSE_TRACE Close trace file
TRACEFILE_NAME Get name of trace file
评论