Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

12

积分

0

好友

6

主题
1#
发表于 2013-12-4 12:38:52 | 查看: 2980| 回复: 2
请教一个原理问题:
关于ORA-8007的文章, 'Further changes to this block by this transaction not allowed' Error ( ID 465226.1)
里面有这么一句:
Oracle's block header structure only allows for a maximum of 4095 locked rows per transaction, so it is possible to have more than 4095 locked rows if using a small row size and repeatedly inserting/updating and deleting rows in the same block.
没理解的是,行结构有指向事务槽的指针,但反过来事务槽并不记录本事务涉及的行列表啊,那为什么对单个事务在单块上的锁定行数存在限制呢,应该是无限的才对啊
谢谢。
2#
发表于 2013-12-4 13:49:10
BBED> p ktbbh
struct ktbbh, 72 bytes                      @20      
   ub1 ktbbhtyp                             @20       0x01 (KDDBTDATA)
   union ktbbhsid, 4 bytes                  @24      
      ub4 ktbbhsg1                          @24       0x0000001d
      ub4 ktbbhod1                          @24       0x0000001d
   struct ktbbhcsc, 8 bytes                 @28      
      ub4 kscnbas                           @28       0x00000709
      ub2 kscnwrp                           @32       0x0000
   sb2 ktbbhict                             @36      -2046
   ub1 ktbbhflg                             @38       0x02 (NONE)
   ub1 ktbbhfsl                             @39       0x00
   ub4 ktbbhfnx                             @40       0x00000000
   struct ktbbhitl[0], 24 bytes             @44      
      struct ktbitxid, 8 bytes              @44      
         ub2 kxidusn                        @44       0x0000
         ub2 kxidslt                        @46       0x0002
         ub4 kxidsqn                        @48       0x0000000b
      struct ktbituba, 8 bytes              @52      
         ub4 kubadba                        @52       0x0040022b
         ub2 kubaseq                        @56       0x0011
         ub1 kubarec                        @58       0x17
      ub2 ktbitflg                          @60       0x2001 (KTBFUPB)
      union _ktbitun, 2 bytes               @62      
         sb2 _ktbitfsc                      @62       0
         ub2 _ktbitwrp                      @62       0x0000
      ub4 ktbitbas                          @64       0x0000070a
   struct ktbbhitl[1], 24 bytes             @68      
      struct ktbitxid, 8 bytes              @68      
         ub2 kxidusn                        @68       0x0000
         ub2 kxidslt                        @70       0x0006
         ub4 kxidsqn                        @72       0x0000000b
      struct ktbituba, 8 bytes              @76      
         ub4 kubadba                        @76       0x0040022c
         ub2 kubaseq                        @80       0x0011
         ub1 kubarec                        @82       0x13
      ub2 ktbitflg                          @84       0x2003 (KTBFUPB)
      union _ktbitun, 2 bytes               @86      
         sb2 _ktbitfsc                      @86       0
         ub2 _ktbitwrp                      @86       0x0000
      ub4 ktbitbas                          @88       0x0000070e



ktbitflg 包含了  sb2 locks   带符号 2字节  ,所以 locks 最大是 0XFFF即4095
这是由于在ITL中locks字段是固定的 sb2 导致最大 只能为4095

回复 只看该作者 道具 举报

3#
发表于 2013-12-4 14:43:28
本帖最后由 laobu 于 2013-12-4 14:51 编辑
Liu Maclean(刘相兵 发表于 2013-12-4 13:49
BBED> p ktbbh
struct ktbbh, 72 bytes                      @20      
   ub1 ktbbhtyp                  ...


谢谢答复。

原来ITL真的要记录锁定行数啊
Oracle Core Essential Internals for DBAs and Developers 是这么写的:
ITL当中的Lck字段: Number of rows locked by this transaction in this block.

可这里记录行数有什么用呢?快速清除、延迟清除应该都不依赖这个记数吧
原理还是没搞明白

回复 只看该作者 道具 举报

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

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-6-15 07:35 , Processed in 0.046202 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569