Shared memory can be dumped to trace file using
$ sqlplus /nolog
SQL> CONNECT SYS/ AS SYSDBA
Connected
SQL> ORADEBUG SETMYPID
Statement processed
SQL> ORADEBUG IPC
Information written to trace file
SQL> ORADEBUG TRACEFILE_NAME
/var/opt/oracle/admin/LX092001/udump/lx092001_ora_9824.trc
Granules can be dumped using
ALTER SESSION SET EVENTS‘immediate trace name granulelist level ’
Heap Level
Null Granule 255
Home Granule 511
Shared Pool 767
Large Pool 1023
Java Pool 1279
Buffer Cache 1535
Global Area Dumps
ALTER SESSION SET EVENTS‘immediate trace name global_area level ’
Heap Level
PGA 1
SGA 2
PGA + SGA 3
UGA 4
PGA + UGA 5
SGA + UGA 6
PGA + SGA + UGA 7
Heap Dumps
ALTER SESSION SET EVENTS‘immediate trace name heapdump level ’;
Heap Summary Detail
PGA 1 1025
SGA 2 2050
UGA 4 4100
CGA – Current Call 8 8200
CGA – User Call 16 16400
LGA – Large Pool 32 32800
Subheap Dumps
In Oracle 9.0.1 and below to dump a subheap, first obtain the address of the subheap and convert to decimal
0x56b95c0c = 1454988300
For a summary dump use
ALTER SESSION SET EVENTS ‘immediate trace name heapdump_addr level 1454988300’;
For a detailed dump add 1 to the address e.g.
ALTER SESSION SET EVENTS ‘immediate trace name heapdump_addr level 1454988301’;
In Oracle 9.2 and above to dump the subheap summary use
ALTER SESSION SET EVENTS ‘immediate trace name heapdump_addr level 1, addr 0x56b95c0c’;
For a detailed dump use
ALTER SESSION SET EVENTS ‘immediate trace name heapdump_addr level 2, addr 0x56b95c0c’;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9599/viewspace-472889/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9599/viewspace-472889/