Oracle Space Management Experiment (eight) data block format Analysis--dump combined bbed

Source: Internet
Author: User
Tags commit

Use the dump block format combined with bbed for viewing.

################### #实验准备步骤:

bys@ bys3>create table Test6 (AA int,bb varchar2 (10));

Table created.

bys@ Bys3>insert into TEST6 values (the "BYS");

1 row created.

bys@ Bys3>insert into TEST6 values (, ' hello ');

1 row created.

bys@ bys3>commit;

Commit complete.

bys@ Bys3>alter System checkpoint;

System altered.

bys@ bys3>select dbms_rowid.rowid_relative_fno (ROWID) file#,dbms_rowid.rowid_block_number rowid (BLOCK#,AA,BB) From Test6;

file# block# AA BB

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

4 477 Bys

4 477 Hello

bys@ bys3>alter System dump datafile 4 block 477;

System altered.

bys@ bys3>select value from V$diag_info where name like ' de% ';

VALUE

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

/u01/diag/rdbms/bys3/bys3/trace/bys3_ora_8109.trc

Information interpretation of DUMP data block

Start dump data blocks Tsn:4 file#:4 minblk 477 maxblk 477

Block dumps from cache:--This information from buffer cache, see: Detailed buffer Header--dump buffer combined with X$BH view fields

Dump of buffer cache at level 4 for tsn=4 rdba=16777693

BH (0x22be4e74) file#: 4 rdba:0x010001dd (4/477) class:1 ba:0x2286e000

Set:3 pool:3 bsz:8192 bsi:0 sflg:1 pwc:0,0

dbwrid:0 obj:23326 objn:23326 Tsn:4 afn:4 hint:f

Hash: [0X227E6B54,0X2A7F74AC] LRU: [0x217ee3d4,0x20ff4e64]

CKPTQ: [NULL] FILEQ: [null] OBJQ: [0x217ee3ec,0x20ff4e7c] Objaq: [0x217ee3f4,0x20ff4e84]

St:xcurrent md:null fpin: ' Ktspbwh2:ktspfmdb ' Tch:3

Flags:block_written_once Redo_since_read

Lrba: [0x0.0.0] LSCN: [0x0.0] HSCN: [0XFFFF.FFFFFFFF] Hsub: [1]

########################################## #数据块头部分

Blocks dump from disk:-The following information is from the block in the data file.

Buffer Tsn:4 RDBA:0X010001DD (4/477)--4-8 bytes in a block of data are rdba--the bbed section below can be seen

SCN:0X0000.00874DBB seq:0x01 flg:0x06 tail:0x4dbb0601

FRMT:0X02 chkval:0xeb56 Type:0x06=trans Data--fourth byte corresponds

---flg:0x01 (new block) 0x2 (data block delay cleaning propulsion SCN and seq) 0X04 (set checksum) 0x08 (temporary block) type:0x06 (table/index block)

--FRMT:0X01 (V7) 0x02 (V8)--corresponds to the third byte A2, representing the above 8I version

Hex dump of Block:st=0, typ_found=1

Dump of memory from 0xb68a9200 to 0xb68ab200

b68a9200 0000a206 010001DD 00874DBB 06010000 [...  M. ...] ---this line of information can correspond to the SCN type in the header.

b68a9210 0000eb56 00130001 00005b1e 00874db6 [V ...] [... M..]

b68a9220 1fe80000 00321f02 010001d8 001a0002 [... 2. ...]

b68a9230 00001382 00c00b70 00070569 00002002 [... p...i ...]

....................................

b68ab1d0 54415453 4d5f5355 454b5241 71780752 [STATUS_MARKER.XQ]

B68ab1e0 2618100B 012c021e 46c10202 6c656805 [...,.... F.hel]

b68ab1f0 012c6f6c 5ac10202 73796203 4dbb0601 [Lo,.... Z.bys ... M

######################################### #下面是ITL

Block Header Dump:0x010001dd

Object ID on block? Y

The seg/obj:0x5b1e csc:0x00.874db6 itc:2 flg:e typ:1-Data--the datatype is database.

--seg/obj:0x5b1e--corresponds to dba_objects.data_object_id, TRUNCATE table data_object_id is equal to object_id. Formatting is the writing of this seg/obj on a block:

--CSC:0X00.874DB6 delay block Cleanup when scn--query, third commit--three ITL will do delay block cleanup

--flg:e--refers to the use of the ASSM, if the O means the free list

--typ:1-Data-transaction-type blocks (and: The type:0x06 of data size), storing tables and indexed data.

brn:0 bdba:0x10001d8 ver:0x01 opc:0

inc:0 exflg:0

Itl Xid Uba Flag Lck SCN/FSC

0x01 0x0002.01a.00001382 0x00c00b70.0569.07--u-2 FSC 0X0000.00874DBB

0x02 0x0000.000.00000000 0x00000000.0000.00----0 FSC 0x0000.00000000

--11g default with quick commit, flag is u, normal commit is C.

Serial number of--ITL:ITL transaction slot number

--xid:transac[x]tion identified (transaction ID), consisting of three parts of the number of slots +undo slot number +undo by und segment number

The--uba:undo block address records the most recent previous mirror image of the record (before the modified value)

--FLAG:C is submitted, U is quick to submit,---is uncommitted (Flg c=committed u=commit Upper Bound t=active at CSC)

--lck: Locked a few lines of data, corresponding to a few row locks

--SCN/FSC:SCN=SCN of commited TX; Fsc=free space Credit (bytes)

Here FSC 0X0000.00874DBB refers to the committed SCN, which is greater than the SCN=CSC:0X00.874DB6 (this SCN is the smallest SCN of commited in this block) when the block was last cleared.

--SCN WRAP: If a transaction has been committed and cleaned, the field holds the SCN WRAP portion of the transaction commit the SCN, otherwise the field holds the idle Advance bytes (FSC). For example, delete a row of data 10 bytes, before the transaction advance, the 10 bytes belong to the FSC (that will be written to the SCN WRAP), only transactions are committed before they can be formally returned to the free space.

################################################ #用户数据头

BDBA:0X010001DD-DBA for the current data block

Data_block_dump,data header at 0xb68a9264

===============

Total free space 1f98--8088 bytes for tsiz:0x1f98 block

hsiz:0x16--The number of bytes in the head of the data-not fixed

pbl:0xb68a9264

76543210

flag=--------

Ntab=1--Data block belongs to a table, cluster table is not 1

nrow=2--Number of rows

Frre=-1--the A/1 in the row directory entry

fsbo=0x16--free space begin offset is called start: can hold the starting position of the data space (that is, the starting offset of the free space in the data layer is defined)

fseo=0x1f82--Free spaces end offset is called the ending space: the ending position where the data space can be stored (that is, the end offset of the space in the data layer is defined) inserts the data from here to the beginning--from the back forward

AVSP=0X1F6C----Available spaces for new entries called free Space: Defines the number of bytes of free space in the data layer

TOSP=0X1F6C----total spaces called final free space: Defines the number of bytes of free space in the data layer after transaction commits in ITL

0xe:pti[0] nrow=2 offs=0--table directory, the beginning of the entire table, a total of 2 rows of data, defines the number of slots used in the table's row index

0x12:pri[0] Offs=0x1f8e-row Index, which defines the position of all the row data contained in the block.

0X14:PRI[1] Offs=0x1f82

###################################### #用户数据

Related Article

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.