Buffers Dump


The named dump buffers can be used to dump the buffer cache. The information produced varies. Depending on the level specified, the trace file will contain information pertaining to buffer headers, users and waiters of that buffer, position of that buffer, and other details, such as the object number and tablespace number. The dump file also holds the LRU information about the buffers.

The size of the trace file depends on the init.ora parameter DB_CACHE_SIZE or DB_BLOCK_BUFFERS, depending on the version of the database. You may need to dump the buffer cache if the problem is related to buffer corruption or any other buffer cache related issues. In the Real Application Clusters environment, it is required to dump the buffers in all nodes. This event can be set in the init.ora file to trigger the buffers dump when a particular error occurs.

Syntax

The following methods show how to dump the buffers.

Using ALTER SESSION

The first ALTER SESSION command below produces an immediate buffers dump at specified level, and the second ALTER SESSION produces the buffers dump when the session encounters an ORA-0600 error.

 alter session set events 'immediate trace name buffers level <n>; 
alter session set events '600 trace name buffers level 10';

In the init.ora File

The following event will dump the buffer contents to a trace file when an ORA-600 error occurs. You can specify any other Oracle error number to get the dump when that error occurs the next time.

 event="600 trace name buffers level 10" 

Using oradebug

The following oradebug command produces the buffers dump in a trace file. The level number, denoted by n , controls the amount of information written to the trace file.

 oradebug setmypid 
oradebug dump buffers <n>;

Controlling the Dump Information

The following list shows the available dump levels and the information they produce:

  • Level 1 Dumps only the buffer header information

  • Level 2 Dumps the cache and transaction headers from each block

  • Level 3 Dumps a full dump of each block

  • Level 4 Dumps the working set lists and the buffer headers and the cache header for each block

  • Level 5 Dumps the transaction header from each block

  • Level 6 Dumps full dump of each block




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