一.数据文件的第一个数据块结构kcvfh

BBED> set file 1
FILE# 1 BBED> set block 1
BLOCK# 1 --查看第一个数据块的整体结构
BBED> map /v
File: /u01/app/oracle/oradata/ORCL/datafile/o1_mf_system_bc7ld3sf_.dbf (1)
Block: 1 Dba:0x00400001
------------------------------------------------------------
Data File Header struct kcvfh, 676 bytes @0
struct kcvfhbfh, 20 bytes @0
struct kcvfhhdr, 76 bytes @20
ub4 kcvfhrdb @96
struct kcvfhcrs, 8 bytes @100
ub4 kcvfhcrt @108
ub4 kcvfhrlc @112
struct kcvfhrls, 8 bytes @116
ub4 kcvfhbti @124
struct kcvfhbsc, 8 bytes @128
ub2 kcvfhbth @136
ub2 kcvfhsta @138
struct kcvfhckp, 36 bytes @484
ub4 kcvfhcpc @140
ub4 kcvfhrts @144
ub4 kcvfhccc @148
struct kcvfhbcp, 36 bytes @152
ub4 kcvfhbhz @312
struct kcvfhxcd, 16 bytes @316
word kcvfhtsn @332
ub2 kcvfhtln @336
text kcvfhtnm[30] @338
ub4 kcvfhrfn @368
struct kcvfhrfs, 8 bytes @372
ub4 kcvfhrft @380
struct kcvfhafs, 8 bytes @384
ub4 kcvfhbbc @392
ub4 kcvfhncb @396
ub4 kcvfhmcb @400
ub4 kcvfhlcb @404
ub4 kcvfhbcs @408
ub2 kcvfhofb @412
ub2 kcvfhnfb @414
ub4 kcvfhprc @416
struct kcvfhprs, 8 bytes @420
struct kcvfhprfs, 8 bytes @428
ub4 kcvfhtrt @444 ub4 tailchk @8188 BBED>
--print结构 kcvfh
BBED> print kcvfh
struct kcvfh, 676 bytes @0
struct kcvfhbfh, 20 bytes @0
ub1 type_kcbh @0 0x0b
ub1 frmt_kcbh @1 0xa2
ub1 spare1_kcbh @2 0x00
ub1 spare2_kcbh @3 0x00
ub4 rdba_kcbh @4 0x00400001
ub4 bas_kcbh @8 0x00000000
ub2 wrp_kcbh @12 0x0000
ub1 seq_kcbh @14 0x01
ub1 flg_kcbh @15 0x04 (KCBHFCKV)
ub2 chkval_kcbh @16 0xd5f6
ub2 spare3_kcbh @18 0x0000
struct kcvfhhdr, 76 bytes @20
ub4 kccfhswv @20 0x00000000
ub4 kccfhcvn @24 0x0a200100
ub4 kccfhdbi @28 0x533ddaa4
text kccfhdbn[0] @32 O
text kccfhdbn[1] @33 R
text kccfhdbn[2] @34 C
text kccfhdbn[3] @35 L
text kccfhdbn[4] @36
text kccfhdbn[5] @37
text kccfhdbn[6] @38
text kccfhdbn[7] @39
ub4 kccfhcsq @40 0x0000022d
ub4 kccfhfsz @44 0x0000f000
s_blkz kccfhbsz @48 0x00
ub2 kccfhfno @52 0x0001
ub2 kccfhtyp @54 0x0003
ub4 kccfhacid @56 0x00000000
ub4 kccfhcks @60 0x00000000
text kccfhtag[0] @64
text kccfhtag[1] @65
text kccfhtag[2] @66
text kccfhtag[3] @67
text kccfhtag[4] @68
text kccfhtag[5] @69
text kccfhtag[6] @70
text kccfhtag[7] @71
text kccfhtag[8] @72
text kccfhtag[9] @73
text kccfhtag[10] @74
text kccfhtag[11] @75
text kccfhtag[12] @76
text kccfhtag[13] @77
text kccfhtag[14] @78
text kccfhtag[15] @79
text kccfhtag[16] @80
text kccfhtag[17] @81
text kccfhtag[18] @82
text kccfhtag[19] @83
text kccfhtag[20] @84
text kccfhtag[21] @85
text kccfhtag[22] @86
text kccfhtag[23] @87
text kccfhtag[24] @88
text kccfhtag[25] @89
text kccfhtag[26] @90
text kccfhtag[27] @91
text kccfhtag[28] @92
text kccfhtag[29] @93
text kccfhtag[30] @94
text kccfhtag[31] @95
ub4 kcvfhrdb @96 0x00400179
struct kcvfhcrs, 8 bytes @100
ub4 kscnbas @100 0x00000005
ub2 kscnwrp @104 0x0000
ub4 kcvfhcrt @108 0x33c88f35
ub4 kcvfhrlc @112 0x33cecf37
struct kcvfhrls, 8 bytes @116
ub4 kscnbas @116 0x00073e32
ub2 kscnwrp @120 0x0000
ub4 kcvfhbti @124 0x00000000
struct kcvfhbsc, 8 bytes @128
ub4 kscnbas @128 0x00000000
ub2 kscnwrp @132 0x0000
ub2 kcvfhbth @136 0x0000
ub2 kcvfhsta @138 0x2004 (KCVFHOFZ)
struct kcvfhckp, 36 bytes @484
struct kcvcpscn, 8 bytes @484
ub4 kscnbas @484 0x00073e33
ub2 kscnwrp @488 0x0000
ub4 kcvcptim @492 0x33cecf3e
ub2 kcvcpthr @496 0x0001
union u, 12 bytes @500
struct kcvcprba, 12 bytes @500
ub4 kcrbaseq @500 0x00000001
ub4 kcrbabno @504 0x00000002
ub2 kcrbabof @508 0x0010
ub1 kcvcpetb[0] @512 0x02
ub1 kcvcpetb[1] @513 0x00
ub1 kcvcpetb[2] @514 0x00
ub1 kcvcpetb[3] @515 0x00
ub1 kcvcpetb[4] @516 0x00
ub1 kcvcpetb[5] @517 0x00
ub1 kcvcpetb[6] @518 0x00
ub1 kcvcpetb[7] @519 0x00
ub4 kcvfhcpc @140 0x00000043
ub4 kcvfhrts @144 0x33cecf1e
ub4 kcvfhccc @148 0x00000042
struct kcvfhbcp, 36 bytes @152
struct kcvcpscn, 8 bytes @152
ub4 kscnbas @152 0x00000000
ub2 kscnwrp @156 0x0000
ub4 kcvcptim @160 0x00000000
ub2 kcvcpthr @164 0x0000
union u, 12 bytes @168
struct kcvcprba, 12 bytes @168
ub4 kcrbaseq @168 0x00000000
ub4 kcrbabno @172 0x00000000
ub2 kcrbabof @176 0x0000
ub1 kcvcpetb[0] @180 0x00
ub1 kcvcpetb[1] @181 0x00
ub1 kcvcpetb[2] @182 0x00
ub1 kcvcpetb[3] @183 0x00
ub1 kcvcpetb[4] @184 0x00
ub1 kcvcpetb[5] @185 0x00
ub1 kcvcpetb[6] @186 0x00
ub1 kcvcpetb[7] @187 0x00
ub4 kcvfhbhz @312 0x00000000
struct kcvfhxcd, 16 bytes @316
ub4 space_kcvmxcd[0] @316 0x00000000
ub4 space_kcvmxcd[1] @320 0x00000000
ub4 space_kcvmxcd[2] @324 0x00000000
ub4 space_kcvmxcd[3] @328 0x00000000
word kcvfhtsn @332 0
ub2 kcvfhtln @336 0x0006
text kcvfhtnm[0] @338 S
text kcvfhtnm[1] @339 Y
text kcvfhtnm[2] @340 S
text kcvfhtnm[3] @341 T
text kcvfhtnm[4] @342 E
text kcvfhtnm[5] @343 M
text kcvfhtnm[6] @344
text kcvfhtnm[7] @345
text kcvfhtnm[8] @346
text kcvfhtnm[9] @347
text kcvfhtnm[10] @348
text kcvfhtnm[11] @349
text kcvfhtnm[12] @350
text kcvfhtnm[13] @351
text kcvfhtnm[14] @352
text kcvfhtnm[15] @353
text kcvfhtnm[16] @354
text kcvfhtnm[17] @355
text kcvfhtnm[18] @356
text kcvfhtnm[19] @357
text kcvfhtnm[20] @358
text kcvfhtnm[21] @359
text kcvfhtnm[22] @360
text kcvfhtnm[23] @361
text kcvfhtnm[24] @362
text kcvfhtnm[25] @363
text kcvfhtnm[26] @364
text kcvfhtnm[27] @365
text kcvfhtnm[28] @366
text kcvfhtnm[29] @367
ub4 kcvfhrfn @368 0x00000001
struct kcvfhrfs, 8 bytes @372
ub4 kscnbas @372 0x00000000
ub2 kscnwrp @376 0x0000
ub4 kcvfhrft @380 0x00000000
struct kcvfhafs, 8 bytes @384
ub4 kscnbas @384 0x00000000
ub2 kscnwrp @388 0x0000
ub4 kcvfhbbc @392 0x00000000
ub4 kcvfhncb @396 0x00000000
ub4 kcvfhmcb @400 0x00000000
ub4 kcvfhlcb @404 0x00000000
ub4 kcvfhbcs @408 0x00000000
ub2 kcvfhofb @412 0x000a
ub2 kcvfhnfb @414 0x000a
ub4 kcvfhprc @416 0x33ce5d9c
struct kcvfhprs, 8 bytes @420
ub4 kscnbas @420 0x0006ca36
ub2 kscnwrp @424 0x0000
struct kcvfhprfs, 8 bytes @428
ub4 kscnbas @428 0x00000000
ub2 kscnwrp @432 0x0000
ub4 kcvfhtrt @444 0x00000000 BBED>

注,print出的值可能是不完整的,如果想查看详细的值,最好用dump

二.数据字典X$KCVFH

  X$KCVFH(参考dbsnake博客)的值与kcvfh是相对应的

序号

Column Name

Description

1

ADDR RAW(4)

ADDRESS

2

INDX NUMBER

INDEX

3

INST_ID NUMBER

INSTANCE ID

4

HXFIL NUMBER

FILE#,Datafile number (from control file)

5

HXONS NUMBER

ONLINE | OFFLINE (from control file),HXONS为 0表示 ‘OFFLINE’,为其他值表示 ‘ONLINE’

6

HXSTS VARCHAR2(16)

 

7

HXERR NUMBER

ERROR,decode(HXERR, 0, NULL, 1,’FILE MISSING’,2,’OFFLINE NORMAL’, 3,’NOT VERIFIED’, 4,’FILE NOT FOUND’,5,’CANNOT OPEN FILE’, 6,’CANNOT READ HEADER’, 7,’CORRUPT HEADER’,8,’WRONG FILE TYPE’, 9,’WRONG DATABASE’, 10,’WRONG FILE NUMBER’,11,’WRONG FILE CREATE’, 12,’WRONG FILE CREATE’, 16,’DELAYED OPEN’,14, ‘WRONG RESETLOGS’, 15,’OLD CONTROLFILE’, ‘UNKNOWN ERROR’)

8

HXVER NUMBER

FORMAT,Indicates the format for the header block. The possible values are 6, 7, 8, or 0. 6  - indicates Oracle Version 6;7 – indicates Oracle Version 7;8 – indicates Oracle Version 8;0  - indicates the format could not be determined (for example, the header could not be read)

9

FHSWV NUMBER

 

10

FHCVN NUMBER

Compatibility Vsn

11

FHDBI NUMBER

DBID

12

FHDBN VARCHAR2(9)

DB NAME

13

FHCSQ NUMBER

controlfile sequence number

14

FHFSZ NUMBER

BLOCKS, Current datafile size in blocks

15

FHBSZ NUMBER

datafile block size

16

FHFNO NUMBER

Tablespace datafile number

17

FHTYP NUMBER

Type:

1 control file

2 redo log file

3 vanilla db file; that is, normal data, index, and undo blocks

4 backup control file

5 backup piece

6 temporary db file

18

FHRDB NUMBER

Root dba: This field only occurs in data file #1, and is the location of blocks required during bootstrapping the data dictionary (bootstrap$)

19

FHCRS VARCHAR2(16)

CREATION_CHANGE#,Datafile creation change#

20

FHCRT VARCHAR2(20)

CREATION_TIME,Datafile creation timestamp

21

FHRLC VARCHAR2(20)

RESETLOGS_TIME, Resetlogs timestamp

22

FHRLC_I NUMBER

reset logs count

23

FHRLS VARCHAR2(16)

RESETLOGS_CHANGE#, Resetlogs change#

24

FHPRC VARCHAR2(20)

prev reset logs timestamp

25

FHPRC_I NUMBER

prev reset logs count

26

FHPRS VARCHAR2(16)

prev reset logs SCN

27

FHBTI VARCHAR2(20)

Time the backup started, Updated when executing BEGIN BACKUP on the tablespace. RMAN does not update this field.

28

FHBSC VARCHAR2(16)

System change number when backup started, Updated when executing BEGIN BACKUP on the tablespace. RMAN does not update this field.

29

FHBTH NUMBER

Thread when when backup started, Updated when executing BEGIN BACKUP on the tablespace. RMAN does not update this field.

30

FHSTA NUMBER

The value for the column X$KCVFH.FHSTA (file header status) for an open database with an online datafiles in versions prior to version 10 were all 4, indicating an online fuzzy status.  With version 10 of Oracle the first system tablespace datafile will have a different status of 8196 if the datafile is online and the database is open and not in backup mode. In Oracle , the X$KCVFH.FHSTA column will show 8196 for system data file if COMPATIBLE is set to 10.0.0.0 or higher.  The value of 8196 is a value of 0×04, as in previous releases, plus an AND’d value of 0×2000 (8192) for internal uses. If COMPATIBLE is set to 9.2.0 (lowest possible value for Oracle ), the FHSTA column for system datafile will have a value of 4.   In Oracle, the COMPATIBLE value is irreversible if advanced to a higher value. So the value of 8196 for the fhsta (status) column for the first system tablespace datafile is normal.

31

FHSCN VARCHAR2(16)

CHECKPOINT_CHANGE#, Datafile checkpoint change#, Updated on every checkpoint, but not when in Hot backup state (not online backups). This must remain untouched when you are in hot backup mode, because you might get checkpoints between the BEGIN BACKUP and when you actually start the copying process.

32

FHTIM VARCHAR2(20)

CHECKPOINT_TIME, Datafile checkpoint timestamp

33

FHTHR NUMBER

THREAD#

34

FHRBA_SEQ NUMBER

SEQUENCE,即Redo log sequence number

35

FHRBA_BNO NUMBER

Block number,即the redo log file block number

36

FHRBA_BOF NUMBER

Byte offset,the byte offset into the block at which the redo record starts

37

FHETB RAW(132)

enable threads byte,这个我不确定,是猜的。

38

FHCPC NUMBER

CHECKPOINT_COUNT, Datafile checkpoint count

39

FHRTS VARCHAR2(20)

Recoverd timestamp

40

FHCCC NUMBER

Controlfile Checkpoint Count: Saved copy of the control file record of the checkpoint count. Helps detect old control files.

41

FHBCP_SCN VARCHAR2(16)

Backup Checkpoint SCN: Updated with the checkpoint done while file in Hot backup

42

FHBCP_TIM VARCHAR2(20)

Backup Checkpoint TIME: Updated with the checkpoint done while file in Hot backup

43

FHBCP_THR NUMBER

Backup Checkpoint Thread: Updated with the checkpoint done while file in Hot backup

44

FHBCP_RBA_SEQ NUMBER

Backup Checkpoint Sequence, 即Redo log sequence number: Updated with the checkpoint done while file in Hot backup

45

FHBCP_RBA_BNO NUMBER

the redo log file block number, Updated with the checkpoint done while file in Hot backup

46

FHBCP_RBA_BOF NUMBER

Byte offset,the byte offset into the block at which the redo record starts, Updated with the checkpoint done while file in Hot backup

47

FHBCP_ETB RAW(132)

enable threads byte,这个我不确定,是猜的

48

FHBHZ NUMBER

begin hot backup file size

49

FHXCD RAW(16)

External cache id: Used to ensure that concurrent instances access data through consistent external cache

50

FHTSN NUMBER

TS#,Tablespace number

51

FHTNM VARCHAR2(30)

TABLESPACE_NAME, Tablespace name

52

FHRFN NUMBER

RFILE#, Tablespace relative datafile number

53

FHAFS VARCHAR2(16)

absolute fuzzy scn, 即Minimum PITR SCN

54

FHRFS VARCHAR2(16)

The SCN at which the recovery of this file will be complete (no longer fuzzy). Both above fuzzy SCNs must be zero unless a fuzzy flag is set, and must be greater than the checkpoint SCN

55

FHRFT VARCHAR2(20)

The time at which the recovery of this file will be complete (no longer fuzzy).

56

HXIFZ NUMBER

File is fuzzy (YES | NO),decode(hxifz, 0,’NO’, 1,’YES’, NULL)

57

HXNRCV NUMBER

File needs media recovery (YES | NO),decode(hxnrcv, 0,’NO’, 1,’YES’,NULL)

58

HXFNM VARCHAR2(513)

NAME, Datafile name

59

FHPOFB NUMBER

 

60

FHPNFB NUMBER

 

61

FHPRE10 NUMBER

 

62

FHFIRSTUNRECSCN VARCHAR2(16)

UNRECOVERABLE_CHANGE#, Last unrecoverable change number made to this datafile. If the database is in ARCHIVELOG mode, then this column is updated when an unrecoverable operation completes. If the database is not in ARCHIVELOG mode, this column does not get updated.

63

FHFIRSTUNRECTIME VARCHAR2(20)

UNRECOVERABLE_TIME, Timestamp of the last unrecoverable change. This column is updated only if the database is in ARCHIVELOG mode.

64

HXLMDBA NUMBER

SPACE_HEADER, The amount of space currently being used and the amount that is free, as identified in the space header. decode(hxlmdba, 0, NULL, hxlmdba)

65

HXLMLD_SCN VARCHAR2(16)

LAST_DEALLOC_SCN, Last deallocated SCN

Oracle 10g 数据文件的第一个数据块结构的更多相关文章

  1. 一个将当前目录下HEX文件的第一行数据删除的程序

    为什么要写这样一个函数 在使用SoftConsole开发M3程序时,生成的hex文件,必须要把第一行数据删除,才能在Libero中使用,所以写了这个小工具,这是2.0版本了,第一版是直接删除第一行数据 ...

  2. [MSSQL]找出一天数据中从第一条数据开始每累加1小时的数据

    用Sql Server找出一天数据中从第一条数据开始每累加1小时的数据 -- ============================================= -- Author: Alle ...

  3. oracle分组取每组第一条数据

    oracle分组后取每组第一条数据   '数据格式     分组取第一条的效果   [sql] SELECT * FROM (SELECT ROW_NUMBER() OVER(PARTITION BY ...

  4. oracle 根据字段分组取第一条数据及rank函数说明

    当前有这样一个需求,根据外键对子表数据进行分组,取每组中的一条数据就行了,如图: 如:COMMANDID = 26的有两条,只取一条数据. sql语句: select * from(select SY ...

  5. oracle取order by的第一条数据

    SELECT * FROM (SELECT * FROM TABLE_NAME ORDER BY COL1) WHERE ROWNUM = 1; 备注: 1.不能给 (SELECT * FROM TA ...

  6. Spark Mllib里如何将trainDara训练数据文件里第一行是字段名不是数据给删除掉(图文详解)

    不多说,直接上干货! 具体,见 Hadoop+Spark大数据巨量分析与机器学习整合开发实战的第13章 使用决策树二元分类算法来预测分类StumbleUpon数据集

  7. oracle 10g standby database 实时应用 redo 数据

    -------physical standby database: real-time apply 须要配置 standby redo log: 启用实时应用, 日志应用服务会直接应用接收的redo ...

  8. jpa 主键重复导致查询list的数据总是重复第一条数据

    背境: JPA 读取 Oracle 中的视图,同一条sql, 在数据库 IDE (PLSql)读出 878 条记录并正常显示,代码依然保存了 878 条记录,但所有记录均一样,即数据库中第一条记录. ...

  9. Laravel 5.6 模型关联 user 表后查询 user 表数据只能获取第一条数据,不知道怎么获取第二条

    按照开发手册的说法,肯定是指令不够全,附代码图 如果, tests 是文章表, users 是用户表 test.com/tests/1 是 id 为 1 的文章地址( get 访问) 假如 Tests ...

随机推荐

  1. 【Shell脚本学习16】Shell if else语句

    if 语句通过关系运算符判断表达式的真假来决定执行哪个分支.Shell 有三种 if ... else 语句: if ... fi 语句: if ... else ... fi 语句: if ... ...

  2. Sublime Text shift+ctrl妙用

    1 :按住shift+ctrl然后按←或→可快速选中一行中的某一部分,相当于双击鼠标选中. 当你想在代码末尾加注释的话,这个方法很好用 输入文字->光标移到文字末尾->按住shift+ct ...

  3. [书目20131223]Android、iPhone、Windows Phone手机网页及网站设计:最佳实践与设计精粹 - 张亚飞

    目录 第I篇 手机版专用网站设计和开发入门篇 第1章 准备创作环境和测试环境 3 1.1 使用Mobile Safari测试网页 4 1.1.1 iOS Simulator安装 5 1.1.2 使用M ...

  4. 第五节 关于SpringMVC中Ajax的配置和应用[下午]

    成熟,不是学会表达,而是学会咽下,当你一点一点学会克制住很多东西,才能驾驭好人生. 还有一周,祥云19就算结算了,一个半月的相处希望,胖先生算一个合格的老师 小白,小蔡,2婷婷,小猴,小恒,小崔,小龙 ...

  5. 转: HHVM at Baidu

    评注: 一个项目迁移的问题考虑与实现使用.非常之详细. 转:http://lamp.baidu.com/2014/11/04/hhvm-in-baidu/ 在这之前我们介绍了我们为什么要迁移PHP到H ...

  6. MDNavBarView下拉导航菜单(仿美团导航下拉菜单)

    说到下拉导航菜单这个东西用得还真不少,细心算一下做开发以来这样的菜单已经写了第三次了,但基本都是不能复用.感觉特累人.不经意看到同事写一个类似的下拉菜单,但他引用了开源库仿大众菜单的库,大致看了一下, ...

  7. jQuery简介<思维导图>

    jQuery是继prototype之后有一个优秀的Javascript库,它由John Resig创建于2006年1月.它简化了遍历HTML文档.操作DOM.处理事件.执行动画和Ajax的操作.它独特 ...

  8. mac下apache的多站点配置

    以下操作均建立在    已经配置好了php环境 从网上搜索了下,后来自己配置了下还是比较简单的! 我的环境目录是在/Library/webServer/Documents 测试的时候可以直接在这里建立 ...

  9. Windows删除大文件

    Temp是目录 或者是 文件很大很大很大很大 cmd rd /s /q Temp

  10. jQuery$命名冲突问题解决方法

    也许你在看此文章之前还不知道jquery有一个noConflict()东西了,它就是为了避免与其它js插件碰到相同变量的一个解决方法,利用noConflict()可以把变量存到其它指定的变量中去如,我 ...