Dump buffer Cache

Source: Internet
Author: User

1. Base content: ALTER SESSION SET EVENTS ' immediate trace name buffers level n ';     N Value Meaning: 1 dumps the buffer header only.     2 Dumps the data block on a level 1 basis.     3 The data block content is then dumped on a level 2 basis.     4 Dump buffer header and hash chain.     5 Dumps the data block and hash chain on a level 1 basis.     6 The data block contents and hash chain are then dumped on the level 2 basis.     8 Dumps buffer header and hash chain and users/waiters linked list.     9 The data block, hash chain, and users/waiters linked list are then dumped on the level 1 basis. 10 The data block contents, hash chain, and users/waiters List 2 are then dumped on the level 2. Refreshes the buffer cache alter system flush BUFFER_CACHE;3. The contents of the exported data block #确定表所 Corresponding OBJECT_ID select object_id from dba_objects where object_name= ' T01 ';object_id-------------517804. Read data into buffer cache select * from t01;5.dump out buffer cache ALTER SESSION SET EVENTS ' immediate    Trace name buffers Level 3 ';    Current trace file location: > Oradebug setmypid;. > Oradebug tracefile_name;6. Find the Block BH (000007FF087EECC8) corresponding to the table in the dump file by object_idfile#: 1 rdba:0x0040ed92 (1/60818) class:1ba:000007ff08636000 set:3 blksize:8192 bsi:0 set-flg:2 pwbcnt:0 dbwrid:0obj:51780 objn:51780 tsn:0 afn:1 Hash: [9bf53d8,feee108] LRU: [97e7a88,57f7108] CKPTQ: [null] FILEQ: [null] OBJQ: [97E7AF8,E3D6DD8 ] st:xcurrent md:null tch:4 flags:only_sequential_access lrba: [0x0.0.0] HSCN: [0XFFFF.FFFFFFFF] HSUB:      [65535] buffer tsn:0 rdba:0x0040ed92 (1/60818) scn:0x0000.000a213e seq:0x04 flg:0x06 tail:0x213e0604 frmt:0x02 chkval:0xf9a7 Type:0x06=trans Data Hex dump of block:st=0, typ_found=1 .... data_block_d         Ump,data header at 0x44d005c =============== tsiz:0x1fa0 hsiz:0x1a pbl:0x044d005c bdba:0x0040ed92 76543210 flag=--------ntab=1 nrow=4 frre=3 fsbo=0x1a fseo=0x1e42 avsp=0x1f09 tosp=0x1f09 0x    E:pti[0] nrow=4 offs=0 0x12:pri[0] offs=0x1eb2 0x14:pri[1] offs=0x1ea6 0x16:pri[2] Offs=0x1e42  0X18:PRI[3] sfll=-1 block_row_dump:tab 0, row 0, @0x1eb2 tl:13 fb:--h-fl--lb:0x1 cc:2 col 0: [2] C1, col 1: [6] 6F 6c 0, row 1, @0x1ea6 tl:12 fb:--h-fl--lb:0x1 cc:2 col 0: [2] C1 col 1: [5] 6d  6c tab 0, row 2, @0x1e42 tl:100 fb:--h-fl--lb:0x1 cc:2 col 0: [2] C1 col 1: [6d] 6c 6f, 6c, 6d, 6c, 6f 6c, all-in-6d, 6c--------+----6f 6c------6d 6c 6d, 6c, 6f, all-in-6c, 6d, 6c, 6f, 6c, all, 6d, 6c, 6f, 6c 6c 6f, 6c, 6d, and 6c related fields brief description: |-------obj:51780 means object_id| |     The-------class represents the type of data block corresponding to the buffer header, and the exact value corresponds to the meaning: |1=data Block;|    2=sort block;| 3=save undo Block;|4=segment header;|    5=save undo Header;|    6=free list;|    7=extent map;|    8=1st level bmb;|    9=2nd level bmb;|    10=3rd level bmb;|    11=bitmap block;|    12=bitmap Index block;|    13=unused;|    14=undo header;| 15=undo block. | |    -------rdba:0x0040ed92 (1/60818) indicates that the object corresponds to a data block on a disk data file with address 1th file, 60818 blocks |    #确定表所在文件及数据块 |        Select |        rowid,|        DBMS_ROWID.ROWID_RELATIVE_FNO (ROWID) rel_fno,--File id|        Dbms_rowid.rowid_block_number (ROWID) block_no,--block number|        Dbms_rowid.rowid_row_number (ROWID) row_no,|    id|    From t01;| |    ROWID rel_fno block_no row_no id|    ------------------ ---------- ---------- ---------- ----------|    AAAMPEAABAAAO2SAAA 1 60818 0 0|    Aaampeaabaaao2saab 1 60818 1 1| AAAMPEAABAAAO2SAAC 1 60818 2 1

Reference blog:http://blog.csdn.net/orion61/article/details/8515340

Dump buffer Cache

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.