Oradebug

From Oracle FAQ

Jump to: navigation, search

Oradebug is a command that can be executed from either SQL*Plus or Svrmgrl to display or dump diagnostics information.

Execute the "ORADEBUG HELP" command to obtain a list of valid ORADEBUG commands.

It looks like one can change memory locations with the ORADEBUG POKE command. Anyone brave enough to test this one for us?

Examples

Look at these oradebug examples:

Trace SQL statements with bind variables

SQL> oradebug setospid 10121
Oracle pid: 91, Unix process pid: 10121, image: oracleorcl
SQL> oradebug EVENT 10046 trace name context forever, level 12
Statement processed.
SQL> ! vi /app/oracle/admin/orcl/bdump/ora_10121.trc

Trace Process Statistics

SQL> oradebug setorapid 2
Unix process pid: 1436, image: ora_pmon_orcl
SQL> oradebug procstat
Statement processed.
SQL> oradebug TRACEFILE_NAME
/app/oracle/admin/orcl/bdump/pmon_1436.trc

List semaphores and shared memory segments in use

SQL> oradebug ipc

Dump Error Stack

SQL> oradebug setospid <pid>
SQL> oradebug event immediate trace name errorstack level 3

Dump RAC DLM locks

SQL> oradebug lkdebug -a convlock
SQL> oradebug lkdebug -a convres
SQL> oradebug lkdebug -r <resource handle> (i.e 0x8066d338 from convres dump)
Personal tools