10046 trace and errorstacks can be gathered in a single set of commands, as outlined below. 10046 trace gathers information about the
execution of the process over time, while errorstacks show the underlying code
modules being accessed at a particular point in time. Usually it is best to
collect three errorstacks to indicate if there is any movement between stacks.
To dump the errrorstacks Oracle process id for a slave process must be determined. Assuming the Oracle SID for the process is known then the following
select can be used to find the Oracle process id:
select p.pid,p.SPID,s.SID
from v$process p,v$session s
where s.paddr = p.addr
and s.SID = &SID
/
SPID is the Operating system identifier
SID is the Oracle session identifier
PID is the Oracle process identifier
and then do the following:
Lets assume that the slave process to be dumped has an oracle pid of 34 to trace and errorstack this process use the following commands:
login to SQL*Plus:
connect / as sysdba
oradebug setorapid 34
oradebug unlimit
oradebug event 10046 trace name context forever,level 12
oradebug dump errorstack 3
oradebug dump errorstack 3
oradebug dump errorstack 3
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/92530/viewspace-515966/
,如需转载,请注明出处,否则将追究法律责任。