Podczas recovery: RMAN-03002, ORA-00283, ORA-19764: database id does not match database id in control file

Recovery interrupted!
Recovered data files to a consistent state at change 1234567890
Media Recovery failed with error 19764
ORA-00283: recovery session canceled due to errors
ORA-19764: database id 67890 does not match database id 12345 in control file
Slave exiting with ORA-283 exception
ORA-10877 signalled during: alter database recover logfile '/arch/file_arch_1234321.arch’…

— sprawdzamy dbID

SQL> select dbid,name from v$database;
      DBID NAME
---------- ---------
 12345 baza_zrodlowa

SQL> select FHDBI,FHDBN from X$KRCFH;
     FHDBI FHDBN
---------- --------
 67890 baza_restor

— wylaczamy block change tracking i wlaczamy ponownie

SQL> alter database disable block change tracking;
Database altered.

SQL> select FHDBI,FHDBN from X$KRCFH;
no rows selected

SQL> alter database enable block change tracking using FILE '/oradata/rman_change_track_baza.f';
Database altered.

— sprawdzenie

SQL> select FHDBI,FHDBN from X$KRCFH;
     FHDBI FHDBN
---------- --------
 12345 baza_zrodlowa

SQL> select dbid,name from v$database;
      DBID NAME
---------- ---------
 12345 baza_zrodlowa

— lecimy dalej z restorem archow