SQL adaptation guide for Oracle Database 11, 12 / Data dictionary |
When creating a table, Informix® automatically adds a ROWID integer column (applies to non-fragmented tables only). The ROWID column is auto-filled with a unique number and can be used like a primary key to access a given row.
ORACLE supports ROWIDs, but the data type is different from Informix ROWIDs: ORACLE rowids are CHAR(18).
For example: AAAA8mAALAAAAQkAAA
Since ORACLE rowids are physical addresses, they cannot be used as permanent row identifiers ( After a DELETE, an INSERT statement might reuse the physical place of the deleted row, to store the new row ).
With Informix, SQLCA.SQLERRD[6] contains the ROWID of the last INSERTed or UPDATEd row. This is not supported with ORACLE because ORACLE ROWID are not INTEGERs.
If the BDL application uses Informix rowids as primary keys, the program logic should be reviewed in order to use the real primary keys (usually, serials which can be supported) or ORACLE rowids as CHAR(18) ( Informix rowids will fit in this char data type).
If you cannot avoid the use of rowids, you must change the type of the variables which hold ROWID values. Instead of using INTEGER, you must use CHAR(18). Informix rowids (INTEGERs) will automatically fit into a CHAR(18) variable.
All references to SQLCA.SQLERRD[6] must be removed because this variable will not contain the ROWID of the last INSERTed or UPDATEd row when using the ORACLE interface.