What is oracle DBA ?
DBA: The data block address
The DBA uniquely identifies a database block in
the database.
Behind such a database block address is a datafile number
and the block number within that database file.
The datafile number can be found with dbms_utility.data_block_address_file.
A database block address can be constructed from a datafile
number and a block number with make_data_block_address.
A Data Block Address (DBA) is the address of an Oracle data block for access purposes.
Start 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 SMITHNow, 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
Revert back DBA to
file and block numbers
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
Tags: DBA, Oracle Database
Subscribe to:
Post Comments (Atom)
Share your views...
0 Respones to "What is oracle DBA ?"
Post a Comment