楼主: yexichang

[原创] 深入SecureFile—新一代LOB揭秘

[复制链接]
论坛徽章:
0
11#
发表于 2011-1-20 20:55 | 只看该作者
mark,抽空拜读一下!

使用道具 举报

回复
论坛徽章:
3
生肖徽章2007版:兔
日期:2009-03-10 21:13:502014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11
12#
 楼主| 发表于 2011-1-25 11:36 | 只看该作者
原帖由 Yong Huang 于 2011-1-20 06:59 发表
Very well written. Indeed http://www.orafan.net/blog/352.html is more readable. Please remove the duplicate part starting with "这比BasicFile空闲空篇博文".

I have a strong feeling event 45050 is related to what is called in-memory dispensers. The event may flush or dump those dispensers. But it's *very* undocumented and I can't get it to work. More about these dispensers can be found in patent:
http://www.freepatentsonline.com/7664799.html

It's interesting that Oracle calls this technology SecureFiles and SecureFile LOBs. But I bet most users care more about the compression part of the technology than the security part.

Yong Huang

Yong Huang老大太猛了,的确找到了45050的event,可以dump出secure file的的chunk分配信息

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
13#
发表于 2011-1-26 03:26 | 只看该作者
原帖由 yexichang 于 2011-1-24 21:36 发表

Yong Huang老大太猛了,的确找到了45050的event,可以dump出secure file的的chunk分配信息


Good to know. Please share with us what you find about this event. How did you use it? What's in the dumped trace file? Thanks.

Yong Huang

使用道具 举报

回复
论坛徽章:
31
管理团队2006纪念徽章
日期:2006-04-16 22:44:452012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:52铁扇公主
日期:2012-02-21 15:02:402013年新春福章
日期:2013-02-25 14:51:242014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14
14#
发表于 2012-3-2 07:20 | 只看该作者
after setting the event, event="45050 trace name context forever, level 32768"
then do a test like this :
create table t1(c1 number,c2 clob)
lob (c2) store as securefile (
disable storage in row chunk 8192 RETENTION  NOCACHE LOGGING
);

ALTER TABLE t1 MODIFY LOB(c2) (COMPRESS high);

insert into t1 values( 1, 'ABCDEF');
commit;

In trace file , we will see things like :

ktsla_ins_chunk xid: 0x0006.00b.00048556
ktsla_split_chunk Begin Txn:  xid: 0x0006.010.00048831
ktsla_ins_chunk xid: 0x0006.010.00048831
Chunk Allocated: 0x1db4405 len:12 ctime:1
Chunk Allocated: 0x1db4462 len:1 ctime:0

the information particular interesting is:
"Chunk Allocated: 0x1db4462 ", which is the chunk used by this lob.


使用道具 举报

回复
论坛徽章:
31
管理团队2006纪念徽章
日期:2006-04-16 22:44:452012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:52铁扇公主
日期:2012-02-21 15:02:402013年新春福章
日期:2013-02-25 14:51:242014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14
15#
发表于 2012-3-2 07:30 | 只看该作者
But I confused on this :
db version 11.2.0.1 ,

for this lob locator:
####
col  9: [47]
00 54 00 01 02 0c 00 80 00 01 00 00 00 01 00 00 09 48 df 55 00 1b 40 92 00
05 00 0e 31 81 05 0c 47 31 00 2c 91 01 00 01 01 83 94 1f 01 2c 91
LOB
Locator:
  Length:        84(47)
  Version:        1
  Byte Length:    1
  LobID: 00.00.00.01.00.00.09.48.df.55
  Flags[ 0x02 0x0c 0x00 0x80 ]:
    Type: CLOB
    Storage: SecureFile
    Characterset Format: IMPLICIT
    Partitioned Table: No
    Options: ReadWrite
  SecureFile Header:
    Length:   27
    Old Flag: 0x40 [ SecureFile ]
    Flag 0:   0x92 [ COMPR INODE Valid ]
    Layers:
      Lengths Array: COMPR:5 INODE:14
      COMPR:
        Version           :  1
        Compression Level :  High
        Flags             :  0x81
        Size              :  5
        Head CU           :  Yes
        Compressed Len    :  3143
        Head CU Len       :  3143
      INODE:
        31 00 2c 91 01 00 01 01 83 94 1f 01 2c 91

########
Everything up to the byte (0c 47 ) is clear , i.e from "00 54 00 01 02 0c 00 80 00 01 00 00 00 01 00 00 09 48 df 55 00 1b 40 92 00  05 00 0e 31 81 05 0c 47 ".  ( 0c 47 is len ( 3143) ) .

but I can't figure out how to interpret the INODE information , "31 00 2c 91 01 00 01 01 83 94 1f 01 2c 91".

"01 83 94 1f" is the RDBA of the chunk allocated for lob data storage. the "01" after that , maybe means just 1 block.
but what 's the meaning of "2c 91" afterwards ? and what's the meaning of "31 00 2c 91 01 00 01" ?

使用道具 举报

回复
论坛徽章:
31
管理团队2006纪念徽章
日期:2006-04-16 22:44:452012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:52铁扇公主
日期:2012-02-21 15:02:402013年新春福章
日期:2013-02-25 14:51:242014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14
16#
发表于 2012-3-2 07:58 | 只看该作者
Ok . "2c 91" is the length of uncompressed version. Though still don't understand why it appears twice.

使用道具 举报

回复
论坛徽章:
31
管理团队2006纪念徽章
日期:2006-04-16 22:44:452012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:52铁扇公主
日期:2012-02-21 15:02:402013年新春福章
日期:2013-02-25 14:51:242014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14
17#
发表于 2012-3-2 08:10 | 只看该作者
In comparison, the basic file version of the same lob is much easier to read   ( it has a DBA Array)

col  9: [56]
00 54 00 01 02 0c 00 00 00 01 00 00 00 01 00 00 09 c1 46 27 00 24 05 00 00
00 00 04 17 03 00 00 00 00 00 03 02 26 76 23 02 26 76 24 02 26 76 25 02 26
76 26 02 26 76 27
LOB
Locator:
  Length:        84(56)
  Version:        1
  Byte Length:    1
  LobID: 00.00.00.01.00.00.09.c1.46.27
  Flags[ 0x02 0x0c 0x00 0x00 ]:
    Type: CLOB
    Storage: BasicFile
    Enable Storage in Row
    Characterset Format: IMPLICIT
    Partitioned Table: No
    Options: ReadWrite
  Inode:
    Size:     36
    Flag:     0x05 [ Valid InodeInRow(ESIR) ]
    Future:   0x00 (should be '0x00')
    Blocks:   4
    Bytes:    5891
    Version:  00000.0000000003
    DBA Array[5]:
      0x02267623 0x02267624 0x02267625 0x02267626
      0x02267627
col 10: [ 7]  78 6e 06 12 18 32 38

使用道具 举报

回复
论坛徽章:
86
2015中国数据库技术大会纪念徽章
日期:2015-04-24 16:04:24马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11优秀写手
日期:2013-12-18 09:29:11日产
日期:2013-10-17 08:44:39马自达
日期:2013-08-26 16:28:022013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-23 16:55:51马上有房
日期:2014-02-19 11:55:14
18#
发表于 2012-3-6 09:00 | 只看该作者

使用道具 举报

回复
论坛徽章:
70
夏利
日期:2013-09-29 21:02:15天蝎座
日期:2016-03-08 22:25:51嫦娥
日期:2014-03-04 16:46:45ITPUB年度最佳技术原创精华奖
日期:2014-03-04 16:19:29马上加薪
日期:2014-02-19 11:55:14马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:14马上有车
日期:2014-02-18 16:41:11
19#
发表于 2015-1-27 10:23 | 只看该作者
好文,

使用道具 举报

回复
论坛徽章:
22
ITPUB 11周年纪念徽章
日期:2012-10-09 18:16:002013数据库大会纪念章
日期:2015-03-18 10:16:212014数据库大会纪念章
日期:2015-03-18 10:16:21秀才
日期:2015-07-13 09:55:11金牛座
日期:2015-09-14 18:15:03天蝎座
日期:2015-12-03 09:15:302016猴年福章
日期:2016-02-18 09:31:30猴赛雷
日期:2016-02-18 09:33:422016猴年福章
日期:2016-02-23 09:58:34秀才
日期:2016-03-24 09:20:52
20#
发表于 2015-1-28 11:28 | 只看该作者
新版本咋不直接将BasicFile 去掉呢?
是否意味着basicfile与securefile对比还有可取的地方呢?

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表