 |
|
Oracle Tips by Burleson |
The rowid Concept in
Oracle9i
Under Oracle8, the concept of OBJECTS was
introduced, then expanded in Oracle8i. In 9i, these OBJECTS
identifiers have been added to the rowid, giving an EXTENDED ROWID
format, which is 10 bytes long, versus the 6 bytes that was the norm
in Oracle7. The Oracle8 and Oracle8i rowid is a VARCHAR2
representation of a base-64 number (remember that base-64 starts at
B, not A; A is used to designate 0). The rowid is displayed as
follows:
OOOOOO.FFF.BBBBBB.SSS
where:
See Code Depot
The new parts of the rowid are the object
number and the relative file number. Multiple files can have the
same relative file number because Oracle assigns the number based on
a tablespace. This means that these numbers are unique only per
tablespace, which means that you cannot derive an absolute address
directly from the new rowid. This also means that the new rowid
addressing scheme is tablespace-relative.
The new rowid contains the data object
number, which increments when an object’s version changes. An
object’s version changes whenever a table is truncated or a
partition is moved. The data object number is not related to the
object ID.
The rowid can be easily manipulated with the
DBMS_ROWID package (.If, against Oracle admonitions not to, you used
rowid in your Oracle7 application, you will have to familiarize
yourself with this package..
You use export/import to move data.
You use the migration utility.
You use the ODMA to upgrade to 9i.
If you used rowids in your Oracle7
application and stored them as columns in other tables, then these
columns will have to be manually changed to the new format using the
DBMS_ROWID package. If a column in a table has been designated as a
datatype of rowid, it will be altered to accept the new format
during migration; this will not affect the data in the column.

www.oracle-script.com |