21 abr 2009

ORA_ROWSCN Pseudocolumn

Después de leer un articulo en OTN "When a table was updated"

Me surge la duda sobre "scn_to_timestamp", en el manual de oracle figura lo siguiente sobre esta función y su seudo columna:

SCN_TO_TIMESTAMP

Purpose

SCN_TO_TIMESTAMP takes as an argument a number that evaluates to a system change number (SCN), and returns the approximate timestamp associated with that SCN. The returned value is of TIMESTAMP datatype. This function is useful any time you want to know the timestamp associated with an SCN. For example, it can be used in conjunction with the ORA_ROWSCN pseudocolumn to associate a timestamp with the most recent change to a row.

ORA_ROWSCN Pseudocolumn

Purpose

For each row, ORA_ROWSCN returns the conservative upper bound system change number (SCN) of the most recent change to the row. This pseudocolumn is useful for determining approximately when a row was last updated. It is not absolutely precise, because Oracle tracks SCNs by transaction committed for the block in which the row resides. You can obtain a more fine-grained approximation of the SCN by creating your tables with row-level dependency tracking. Please refer to CREATE TABLE ... NOROWDEPENDENCIES | ROWDEPENDENCIES for more information on row-level dependency tracking.

20 abr 2009

IMP-00061: Warning: Object type "X"."X" already exists with a different identifier

Estuve realizando una migración de Oracle 10gR2 de Windows a Oracle Linux 10gR2 también, y como no podía ser de otra forma surgieron problemas y errores. Me voy a detener solamente en este, que me resulto interesante, sobre todo por la poca info que encontré.

Comando de importación:

  • imp system/xxx IGNORE=Y FILE=$file LOG=Log.log SHOW=N BUFFER=100000 RECORDLENGTH=8192

Salida de log de importación:

IMP-00061: Warning: Object type "SYSTEM"."REPCAT$_OBJECT_NULL_VECTOR" already exists with a different identifier

.......................................................

IMP-00061: Warning: Object type "SYSMAN"."MGMT_BCN_THRESHOLD" already exists with a different identifier

......................................................

IMP-00061: Warning: Object type "SYSMAN"."MGMT_CRED_ROW_ARRAY" already exists with a different identifier

Causa: en la creación de las tablas se genera un chequeo de tipos de datos en donde el type id no coincide.

Solución: agregar en el parámetro del impor toid_novalidate con el nombre de los objetos que generan el problema.

Ej:

imp system/xxxxx IGNORE=Y FULL=Y FILE=$files LOG=impFull.log FEEDBACK=10000 SHOW=N ANALYZE=N BUFFER=100000 RECORDLENGTH=8192 toid_novalidate= OLAPSYS.ALL_OLAP2_AW_METADATA_O, OLAPSYS.ALL_OLAP2_AW_METADATA_T, OLAPSYS.OLAP_SYS_AW_ACCESS_OBJ, OLAPSYS.OLAP_SYS_AW_ACCESS_TBL, OLAPSYS.OLAP_SYS_AW_ENABLE_ACCESS_OBJ, OLAPSYS.OLAP_SYS_AW_ENABLE_ACCESS_TBL, OLAPSYS.O_MESG_ROW, ...,etc