Chinaunix首页 | 论坛 | 博客
  • 博客访问: 598124
  • 博文数量: 825
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 4980
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-27 14:19
文章分类

全部博文(825)

文章存档

2011年(1)

2008年(824)

我的朋友

分类:

2008-10-27 14:27:46

     很多时候,我们可以从的Trace文件中获得Block的DBA(Data Block Address),有时候需要对这个地址进行转换才能得到相应的Block地址。

有的trace文件中已经包含了地址转换,例如: 

Start dump data blocks tsn: 4 file#: 4 minblk 465 maxblk 465
buffer tsn: 4 rdba: 0x010001d1 (4/465)

而有时候trace文件里只包含一个RDBA,比如上周我们遇到的一个案例:

oer 8102.2 - obj# 111465, rdba: 0x08811ba3
kdk key 8102.2:
  ncol: 2, len: 15
  key: (15):  07 78 6a 08 1f 01 14 15 06 06 00 00 06 00 73
  mask: (4096):

这里的Rdba我们怎样才能转换为文件号和数据块号呢?

通过手工转换,可以参考如下文章:

同时提供一个系统包 dbms_utility 可以用于对RDBA进行转换。

注意,对于上面的 rdba: 0x08811ba3,首先要做一个16进制到10进制的转换,转换方法参考:

下面我们使用dbms_utility 来进行转换:

SQL> variable file# number
SQL> variable block# number
SQL> execute :file#:=dbms_utility.data_block_address_file(to_number('8811ba3','xxxxxxx'));

PL/SQL procedure successfully completed.

SQL> execute :block#:=dbms_utility.data_block_address_block(to_number('8811ba3','xxxxxxx'));

PL/SQL procedure successfully completed.

SQL> print file#

     FILE#
----------
        34

SQL> print block#

    BLOCK#
----------
     72611

这样就可以通过dba_extents获得相关对象信息。

当然这里oer 8102.2 的信息已经告诉我们,出问题的是一个索引: 

$ oerr ora 8102
08102, 00000, "index key not found, obj# %s, dba %s (%s)"
// *Cause:  Internal error: possible inconsistency in index
// *Action:  Send trace file to your customer support representative, along
//           with information on reproducing the error

-The End-

【责编:Chuan】

--------------------next---------------------

阅读(338) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~