Processstate dumps are usually required to collect more information when diagnosing memory corruptions or dead lock errors. Processstate dumps also show the details about the shared objects used by the library cache and help in determining the process. This is very helpful in diagnosing the hanging or looping conditions. The dump can be initiated immediately or set to occur when the errors happens. Immediate invocation is not very common.
The following methods show how to produce a processstate dump.
The first ALTER SESSION command below produces an immediate processstate dump at level 10 while the second ALTER SESSION command produces the dump when the session encounters an ORA-4020 error.
alter session set events 'immediate trace name PROCESSSTATE level 10';
alter session set events '4020 trace name PROCESSSTATE level 10';
The following oradebug command will produce an immediate processstate dump at level 10.
oradebug setmypid
oradebug unlimit
oradebug dump processstate 10