martes, 22 de enero de 2013

ORA-00001: unique constraint (RMAN.TS_U1) violated al realizar resync catalog



El problema se produce al recrear el tablespace temporal y recrearlo, por un bug de Oracle 7215002, que viola la constraint TS_U1 sobre los campos: DBINC_KEY, TS#, DROP_SCN.
 

RMAN> resync catalog;
 
starting full resync of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of resync command on default channel at 01/22/2013 12:04:04
ORA-00001: unique constraint (RMAN.TS_U1) violated

Se puede aplicar el patch correspondiente o realizar el siguiente workarround que lo resuelve de modo inmediato:
1.     Conectarse a la base del catálogo de rman:
SQL> SELECT * from ts where dbinc_key=2 and TS#=2
 
 
DBINC_
KEY
TS#
TS_NAME
CREATE_SCN
CREATE_TIME
BIGFILE
TEMPORARY
DROP_
SCN
DROP_
TIME
INCLUDED_IN_
DATABASE_BACKUP
ENCRYPT_IN_
BACKUP
2
2
TEMPORAL
29087
27/08/2004 16:52:55
NO
NO
 
 
YES
 
2.       Eliminar el tablespace temporal de la table TS:
SQL> delete from ts where dbinc_key=2 and TS#=2;
SQL> COMMIT;
3.     Realizar el resync del catálogo:
RMAN> resync catalog;
 
starting full resync of recovery catalog
full resync complete
 
RMAN>
4.     Verificar que se inserte el registro correspondiente en la tabla TS del catálogo
SQL> SELECT * from ts where dbinc_key=2 and TS#=2
 
DBINC_
KEY
TS#
TS_NAME
CREATE_SCN
CREATE_TIME
BIGFILE
TEMPORARY
DROP_
SCN
DROP_
TIME
INCLUDED_IN_
DATABASE_BACKUP
ENCRYPT_IN_
BACKUP
2
2
TEMPORAL
7121427154
19/01/2013 12:26:42
NO
YES
 
 
NO
 
 

No hay comentarios:

Publicar un comentario