data block address

这里讨论的不是数据库管理员DBA,而是数据块地址DBA:Data Block Address!
A Data Block Address (DBA) is the address of an Oracle data block for access purposes.
----源自《Oracle内核技术揭秘》的探索
DBA的结构:8以后,DBA中,前10个二进制位是文件号,后面的就是块号了。
DBA的转换:dump出来文件之后,有的DBA后面有转换后的结果,比如:
rdba: 0x010001c8 (4/456);有的DBA却没有转换后的结果,比如记录高水位的DBA:
 HWM Flag: HWM Set
      Highwater::  0x010001d0  ext#: 0      blk#: 8      ext size: 8
以例子中的DBA为例,转换:

一个DBA转换的例子:转自:http://www.orafaq.com/wiki/Data_block_address
Find the DBA for a given rowStart by getting the file and block number of the row. Example:
SQL> SELECT
  2    dbms_rowid.rowid_relative_fno(rowid) REL_FNO,
  3    dbms_rowid.rowid_block_number(rowid) BLOCKNO,
  4    empno, ename
  5  FROM emp WHERE empno = 7369;
   REL_FNO    BLOCKNO      EMPNO ENAME
---------- ---------- ---------- ----------
         4         20       7369 SMITH

Now, convert the file and block numbers to a DBA address:
SQL> variable dba varchar2(30)
SQL> exec :dba := dbms_utility.make_data_block_address(4, 20);
PL/SQL procedure successfully completed.
SQL> print dba
DBA
--------------------------------
16777236

Convert a DBA back to file and block numbersExample:
SQL> SELECT dbms_utility.data_block_address_block(16777236) "BLOCK",
  2         dbms_utility.data_block_address_file(16777236) "FILE"
  3    FROM dual;
     BLOCK       FILE
---------- ----------
        20          4

不过,使用dbms_utility包搞出来的DBA与dump出来的DBA不相同,dump出来的DBA,可以使用转换二进制的方<span><span>式计算出来(上面给出了例子),但是dbms_utility计算出来的DBA,使用转换二进制的方式,算出来的明显不正确。</span></span>
时间: 2024-10-08 22:49:39

data block address的相关文章

Oracle Study之案例--Oracle 数据块地址(Block Address)

Oracle Study之案例--Oracle 数据块地址(Block Address) Oracle访问数据是以block为单位,本文简单介绍了如何通过Block Address在内存中获取所需要的block. DBA(data block address): A DBA is the address of an oracle data block for access purposes. RDBA (Tablespace relative database block address): R

Data Block Compression

The database can use table compression to eliminate duplicate values in a data block. This section describes the format of data blocks that use compression. The format of a data block that uses basic and advanced row compression is essentially the sa

Sort Detail Data Block Example - Oracle Forms

Example is given below to sort detail data block data (toggle asc or desc) with push buttons used as header of grid, by setting ORDER_BY property of data block using SET_BLOCK_PROPERTY command. The following is the screen shot of this example and thi

How To Commit Just One Data Block Changes In Oracle Forms

You have an Oracle Form in which you have multiple data blocks and requirement is to commit just one data block changes and not to effect any other data blocks. But suppose you have a commit_form button also in form which will commit all the data blo

Create Data Block Based On From Clause Query In Oracle Forms

Example is given below to create a data block based on From Clause query in Oracle Forms. The following are the steps: Create a data block manually and set the following properties: You can specify different query as per your need. Then create the it

模拟ORA-26040: Data block was loaded using the NOLOGGING option

我们知道通过设置nologging选项.能够加快oracle的某些操作的运行速度,这在运行某些维护任务时是非常实用的,可是该选项也非常危急,假设使用不当,就可能导致数据库发生ORA-26040错误. 首先.构造使用环境. SQL> select tablespace_name,logging,force_logging from dba_tablespaces; TABLESPACE_NAME LOGGING FOR ------------------------------ --------

ORA-01578 data block corrupted 数据文件损坏 与 修复 (多为借鉴 linux)

好吧,先说说造成崩溃的原因: 使用redhat 5.9 Linux 作为数据库服务器, 周五数据库正在使用中,硬关机造成数据库文件部分损坏(周一上班时,应用程序启动不起来,查看日志文件时,发现一个数据表映射失败) 使用pl/sql 查询数据文件时,发现 查询表正常,但是使用 where限制条件的时候,会造成崩溃      (只是为了说明命令,未保留当时警告截图) 然后出现 ORA-01578 data block corrupted , 因此 问题排查为当前数据表索引存在问题, 因此使用备份数据

Oracle Form开发应用之Data Block级别的主要属性

项目(英文)  项目(中文) 说明 General 常规 * Name 名称  Data Block 名称 eg:BLK_NAME  * Subclass Information   子类信息  设定Property class eg:BLOCK Navigation 导航  * Navigation Style  导航器风格  当光标到记录的最后一个item后  Same Recorde: 返回到第一个Item  Change Recorde: 转到下一个Recorde的第一个Item  Ch

[Firmware Warn]: GHES: Failed to read error status block address for hardware error source

Firmware Warn 问题描述: 系统版本:Ubuntu 12.04 LTS. 系统启动后dmesg打印大量Firmware Warn告警信息到syslog文件中.信息如下: [Firmware Warn]: GHES: Failed to read error status block address for hardware error source: 1. [Firmware Warn]: GHES: Failed to read error status block address