Buffer Header--dump Buffer Combining X$BH view fields

Source: Internet
Author: User
Tags header

Buffer header structure Diagram and introduction

Figure 1:

Buffer header: Each data block is read into the buffer cache, will first in the buffer cache to construct a buffer Header,buffer header and data block one by one corresponding. The main information contained in the buffer header is:

1 The actual memory address of the data block in the buffer cache. Is the meaning of the dashed arrow in the above figure.

2 The type of the block, including data, segment header, undo header, undo blocks, and so on.

3 The hash chain of the buffer header is implemented by holding a pointer to the previous buffer header in the buffer header and pointing to a pointer to the latter buffer header.

4 The buffer header is located in the LRU, Lruw, CKPTQ, and other linked lists (these linked lists we will be detailed later). It is also achieved by recording the buffer header pointer before and after.

5 The status of the data block corresponding to the current buffer header and the mark.

6 The number of times the buffer header is accessed (touch).

7 is waiting for the buffer header's process list (waiter list) and the list of processes that are using the buffer header (user list).

The buffer specified in DUMP block--contains BH method as follows: --database version: 11.2.0.4

-Add, if it is to dump the entire buffer CACHE, you can refer to: http://blog.csdn.net/haibusuanyun/article/details/17439845

bys@ bys3>select dept.*,dbms_rowid.rowid_object (ROWID) object#,dbms_rowid.rowid_relative_fno rowid (FILE#,DBMS_) Rowid.rowid_block_number (ROWID) block#,dbms_rowid.rowid_row_number (ROWID) row# from dept;

DEPTNO dname LOC object# file# block#

---------- -------------- ------------- ---------- ---------- ---------- ----------

Ten ACCOUNTING NEW YORK 22327 4 251 0

DALLAS 22327 4 251 1

OPERATIONS BOSTON 22327 4 251 2

Chedan BJ 22327 4 251 3

bys@ bys3>select dbms_utility.make_data_block_address (4,251) from dual;

Dbms_utility. Make_data_block_address (4,251)

-------------------------------------------

16777467

Alter session SET Events ' immediate trace name SET_TSN_P1 level 5 ';

Alter session SET Events ' immediate trace name buffer level 16777467 ';

Select value from V$diag_info where name like ' de% ';

SELECT * from X$BH where dbarfil=4 and dbablk=251; Use the SYS user to view the corresponding information from the X$BH against the dump file.

#########################################################

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.