Buffer Dump


The buffer dump is same as the buffers dump discussed in the preceding session, except as regards the LRU information. The buffer dumps all the buffers in the buffer cache of the given Data Block Address (DBA) at level 10. This can be used to dump the buffers of the known DBA. Starting from Oracle8 you need to set the SET_TSN_P1 event because the address is taken as relative DBA, which is specific to a tablespace. This dump is usually taken to investigate the buffer copies of the single known buffer. Note the number of CR copies of the specific buffer in the buffer cache is limited by the undocumented parameter __DB_BLOCK_MAX_CR_DBA. You may need to use the buffer dump when the error is related to a single buffer (or a set of buffers). In this case, having the buffer dump will be a big overhead, and this will be expensive when the buffer cache is large.

Syntax

The following methods show how to dump the contents of the buffer cache.

Using ALTER SESSION

In order to enable the event, SET_TSN_P1 you need to find out the tablespace number (TS#) from V$TABLESPACE as follows :

 select ts#, name 
from V$tablespace;

TS# NAME
---------- ------------------------------
0 SYSTEM
1 UNDOTBS1
2 SYSAUX
3 TEMP
4 USERS

The following two ALTER SESSION commands can then be used to dump the buffer.

 alter session set events 'immediate trace name SET_TSN_P1 level <TS#+1>'; 
alter session set events 'immediate trace name BUFFER level <RDBA>';

Using oradebug

The following sequence of oradebug commands shows how to dump the buffer to a trace file. The process ID can be obtained from the V$PROCESS view.

 oradebug setospid <process ID> 
oradebug unlimit
oradebug dump buffer <RDBA>

Controlling the Dump Information Using Levels

Not applicable .




Oracle Wait Interface
Oracle Wait Interface: A Practical Guide to Performance Diagnostics & Tuning (Osborne ORACLE Press Series)
ISBN: 007222729X
EAN: 2147483647
Year: 2004
Pages: 114

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net