From Oracle FAQ
Jump to: navigation, search

Oradebug is a command that can be executed from SQL*Plus (or Svrmgrl in Oracle 8i and lower releases) 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?

[edit] 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.

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)

[edit] Also see

  • Trace events, used for debugging the Oracle database server.