miércoles, 6 de noviembre de 2019

RMAN-06189: current DBID does not match target mounted database

RMAN-06189: current DBID does not match target mounted database


Hola

Ocurre este error cuando ejecuto el comando CATALOG START WITH desde RMAN.

RMAN> CATALOG START WITH 'E:\backup\';

Starting implicit crosscheck backup at 13-OCT-19
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of catalog command at 10/13/2019 16:39:14
RMAN-12010: automatic channel allocation initialization failed
RMAN-06189: current DBID 4269500080 does not match target mounted database (4242985402)

El error se debe a que no definí la variable DBID antes de hacer el catalog start with.

Como estoy haciendo una tarea de restauración de base de datos, anteriormente he ejecutado RESTORE CONTROL FILE y montado la base de datos con ALTER DATABASE MOUNT. Por lo que ya no puedo ejecutar set DBID.

Este error obtengo al ejecutar SET DBID inmediatamente.

RMAN> SET DBID 4242985402;

executing command: SET DBID
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 10/13/2019 16:51:43
RMAN-06188: cannot use command when connected to a mounted target database

Les dejo link aquí para saber cómo obtener el DBID de Oracle.

Solución.


Así que tengo que apagar la base de datos y ejecutar los pasos anteriores.
En resumen: Apagar, ejecutar SET DBID, startup nomount, restore controlfile, montar y catalog start with nuevamente.

Les dejo aquí abajo los comandos RMAN y su output.

RMAN> SHUTDOWN IMMEDIATE;

ORACLE error from target database:
ORA-00210: cannot open the specified control file

Oracle instance shut down

RMAN> SET DBID 4042975402;

RMAN> SHUTDOWN IMMEDIATE;

ORACLE error from target database:
ORA-00210: cannot open the specified control file

Oracle instance shut down

RMAN> SET DBID 4242985402;

executing command: SET DBID

RMAN> STARTUP NOMOUNT;

connected to target database (not started)
Oracle instance started

Total System Global Area    1670221824 bytes

Fixed Size                     2176328 bytes
Variable Size               1342180024 bytes
Database Buffers             318767104 bytes
Redo Buffers                   7098368 bytes

RMAN> RESTORE CONTROLFILE FROM 'E:\backup\O1_MF_S_1021562333_GT6Y4Y4W_.BKP';

Starting restore at 13-OCT-19
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=126 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output file name=D:\APP\<ORACLE_BASE>\ORADATA\DATABASE\CONTROL01.CTL
output file name=D:\APP\<ORACLE_BASE>\FLASH_RECOVERY_AREA\DATABASE\CONTROL02.CTL
Finished restore at 13-OCT-19

RMAN> ALTER DATABASE MOUNT;

database mounted
released channel: ORA_DISK_1

RMAN> CATALOG START WITH 'E:\backup\';
.
.
Do you really want to catalog the above files (enter YES or NO)? Y
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: E:\BACKUP\O1_MF_NNNDF_TAG20191013T151636_GT6Y0OVS_.BKP
File Name: E:\BACKUP\O1_MF_S_1021562333_GT6Y4Y4W_.BKP


Con esto, el comando CATALOG START WITH ya lista los archivos de backup disponibles a catalogar.


Espero les sirva.







No hay comentarios.:

Publicar un comentario