[转自Oracle ACE--刘相兵]Oracle内部视图X$KFFXP

原文网址:http://www.askmaclean.com/archives/oracle%E5%86%85%E9%83%A8%E8%A7%86%E5%9B%BExkffxp.html


X$KFFXP是ASM(Automatic Storage Management)自动存储管理特性的重要内部视图,该视图反应了File Extent Map映射关系,ASM会将文件split成多个多个piece分片,这些分片被称为Extents。 在Disk上存放这些Extent的位置,就是我们常说的”Allocation Unit”。

KFF意为Kernel File,X$KFFXP即Kernel File Extent Maps, 该内部视图的一条记录代表一个Extent。

其字段含义如下:

GROUP_KFFXP diskgroup number (1 - 63) ASM disk group number. Join with v$asm_disk and v$asm_diskgroup

NUMBER_KFFXP file number for the extent ASM file number. Join with v$asm_file and v$asm_alias

COMPOUND_KFFXP (group_kffxp << 24) + file # File identifier. Join with compound_index in v$asm_file

INCARN_KFFXP file incarnation number File incarnation id. Join with incarnation in v$asm_file

PXN_KFFXP physical extent number Extent number per file

XNUM_KFFXP extent number bit 31 set if indirect Logical extent
number per file (mirrored extents have the same value)

LXN_KFFXP logical extent number 0,1 used to identify primary/mirror extent,2 identifies file header allocation unit (hypothesis) used in the query such that
we go after only the primary extents,not secondary extents 

DISK_KFFXP disk on which AU is located Disk number where the extent is allocated.
Join with v$asm_disk Relative position of the allocation unit from the beginning of the disk. 

AU_KFFXP AU number on disk of AU allocation unit size (1 MB) in v$asm_diskgroup

从11g开始加入了CHK_KFFXP SIZE_KFFXP 2个新的字段

CHK_KFFXP 未知 可能是范围为[0-256]的某种校验值

SIZE_KFFXP size_kffxp is used such that we account for variable sized extents.
sum(size_kffxp) provides the number of AUs that are on that disk.

在实例级别控制ASM Diskgroup AU 和 stripe size的是2个隐藏参数 _asm_ausize 1048576 以及 _asm_stripesize 131072。从11g开始一个Extent可能包含多个AU。

可以通过以下脚本查询文件与Extent等ASM属性的映射关系:

set linesize 140 pagesize 1400 col "FILE NAME" format a40 set head on select NAME "FILE NAME",NUMBER_KFFXP "FILE NUMBER",XNUM_KFFXP "EXTENT NUMBER",DISK_KFFXP "DISK NUMBER",AU_KFFXP "AU NUMBER",SIZE_KFFXP "NUMBER of AUs" from x$kffxp,v$asm_alias where GROUP_KFFXP = GROUP_NUMBER and NUMBER_KFFXP = FILE_NUMBER and system_created = 'Y' and lxn_kffxp = 0 order by name;

相关文章

数据库版本:11.2.0.4 RAC(1)问题现象从EM里面可以看到,在23号早上8:45~8:55时,数据库等待会话暴增...
(一)问题背景最近在对一个大约200万行数据的表查看执行计划时,发现存在异常,理论上应该返回100多万...
(一)删除备份--DELETE命令用于删除RMAN备份记录及相应的物理文件。当使用RMAN执行备份操作时,会在RM...
(1)DRA介绍 数据恢复顾问(Data Recovery Advise)是一个诊断和修复数据库的工具,DRA能够修复数据文...
RMAN(Recovery Manager)是Oracle恢复管理器的简称,是集数据库备份(backup)、修复(restore)和恢复...
(1)备份对象 可以使用RMAN进行的备份对象如下: --整个数据库:备份所有的数据文件和控制文件; --数...