The DBMS_ROWID
package lets you create ROWIDs
and obtain information about ROWID
s from PL/SQL programs and SQL statements. You can find the data block number, the object number, and other ROWID
components without writing code to interpret the base-64 character external ROWID
. DBMS_ROWID
is intended for upgrading from Oracle database version 7 to Oracle database version 8.X.
Summary of DBMS_ROWID Subprograms
Table 126-5 DBMS_ROWID Package Subprograms
Subprogram | Description |
---|---|
Returns the block number of a | |
Creates a | |
Returns the type and components of a | |
Returns the object number of the extended | |
Returns the file number of a | |
Returns the row number | |
Returns the absolute file number associated with the | |
Converts a | |
Converts an extended | |
Returns the | |
Checks if a |
SELECT ROWID,
DBMS_ROWID.ROWID_OBJECT(ROWID) as OBJECT#,
DBMS_ROWID.ROWID_RELATIVE_FNO(ROWID) as FILE#,
DBMS_ROWID.ROWID_BLOCK_NUMBER(ROWID) as BLOCK#,
DBMS_ROWID.ROWID_ROW_NUMBER(ROWID) as ROW#,
T.EMPLOYEE_ID as eid,
T.FIRST_NAME || T.LAST_NAME as name
FROM HR.EMPLOYEES T;
可以看到这张表里的记录存放在了两个块中92、93;
如果我们想看看块中的内容,那么我们可以根据文件号和块号来dump出:
SQL> alter system dump datafile 5 block 92;
然后即可查看里面的具体内容,详细信息,请查看老郭的一篇文章:http://www.itpub.net/forum.php?mod=viewthread&tid=1772905