有时我们想确切的知道一个数据块的结构或者想知道数据块中所存储的数据。
我们可以通过dump文件查看其内容,oracle的数据块可以被dump到操作系统的级别,即导出文件
下面要我们实际的看看oracle data block。
在开始之前我们需要确定datafile 和data block
segment_name format a20
2 segment_name, 3 file_id, 4 block_id 5 from dba_extents 6 where segment_name='TEST';
SEGMENT_NAME FILE_ID BLOCK_ID -------------------- ---------- ---------- TEST 4 195
|
或者通过另一个方式
SYS@orcl>ed Wrote file afiedt.buf
1* select header_file,header_block from dba_segments where segment_name='TEST' SYS@orcl>/
HEADER_FILE HEADER_BLOCK ----------- ------------
4 195
SYS@orcl> alter system dump datafile 4 block 195;
system altered.
|
DUMP 文件内容():
我们先知道如何的查看数据块,之后再针对具体的内容进行分析
[oracle@localhost udump]$ cat orcl_ora_4353.trc /oracle/orc10g/admin/orcl/udump/orcl_ora_4353.trc Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production With the Partitioning, OLAP and Data Mining options ORACLE_HOME = /oracle/orc10g/product/10.1.0/db_1 System name: Linux Node name: localhost.localdomain Release: 2.6.9-42.ELsmp Version: #1 SMP Wed Jul 12 23:27:17 EDT 2006 Machine: i686 Instance name: orcl Redo thread mounted by this instance: 1 Oracle process number: 19 Unix process pid: 4353, image: oracle@localhost.localdomain (TNS V1-V3)
*** 2010-03-10 23:11:39.714 *** SERVICE NAME:(SYS$USERS) 2010-03-10 23:11:39.713 *** SESSION ID:(146.11) 2010-03-10 23:11:39.713 Start dump data blocks tsn: 4 file#: 4 minblk 195 maxblk 195 buffer tsn: 4 rdba: 0x010000c3 (4/195) scn: 0x0000.000999c8 seq: 0x03 flg: 0x04 tail: 0x99c82303 frmt: 0x02 chkval: 0x6b44 type: 0x23=PAGETABLE SEGMENT HEADER Extent Control Header -----------------------------------------------------------------
Extent Header:: spare1: 0 spare2: 0 #extents: 1 #blocks: 8 last map 0x00000000 #maps: 0 offset: 2716 Highwater:: 0x010000c4 ext#: 0 blk#: 3 ext size: 8 #blocks in seg. hdr's freelists: 0 #blocks below: 0 mapblk 0x00000000 offset: 0 Unlocked -------------------------------------------------------- Low HighWater Mark : Highwater:: 0x010000c4 ext#: 0 blk#: 3 ext size: 8 #blocks in seg. hdr's freelists: 0 #blocks below: 0 mapblk 0x00000000 offset: 0 Level 1 BMB for High HWM block: 0x010000c1 Level 1 BMB for Low HWM block: 0x010000c1 --------------------------------------------------------
Segment Type: 1 nl2: 1 blksz: 8192 fbsz: 0 L2 Array start offset: 0x00001434 First Level 3 BMB: 0x00000000 L2 Hint for inserts: 0x010000c2 Last Level 1 BMB: 0x010000c1 Last Level II BMB: 0x010000c2 Last Level III BMB: 0x00000000 Map Header:: next 0x00000000 #extents: 1 obj#: 49346 flag: 0x10000000 Inc # 0 Extent Map -----------------------------------------------------------------
0x010000c1 length: 8
Auxillary Map --------------------------------------------------------
Extent 0 : L1 dba: 0x010000c1 Data dba: 0x010000c4 --------------------------------------------------------
Second Level Bitmap block DBAs --------------------------------------------------------
DBA 1: 0x010000c2
End dump data blocks tsn: 4 file#: 4 minblk 195 maxblk 195
|
阅读(1484) | 评论(0) | 转发(0) |