专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »数据库 » dbmssql:使用DBMS_UTILITY转换Block地址 »正文

dbmssql:使用DBMS_UTILITY转换Block地址

来源: 发布时间:星期二, 2009年2月24日 浏览:0次 评论:0
="t18"> 很多时候我们可以从OracleTrace文件中获得BlockDBA(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我们怎样才能转换为文件号和数据块号呢? 通过手工转换可以参考如下文章: http://www.eygle.com/archives/2004/08/how_to_convert_rdba.Html Oracle同时提供个系统包 dbms_utility 可以用于对RDBA进行转换 注重对于上面 rdba: 0x08811ba3首先要做个16进制到10进制转换转换思路方法参考: http://www.eygle.com/archives/2004/06/oracle_howto_convert.html 下面我们使用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> pr file# FILE#
----------
34 SQL> pr 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-
0

相关文章

读者评论

发表评论

  • 昵称:
  • 内容: