12 Replies Latest reply: Feb 16, 2013 2:43 AM by bas_ua RSS

    resync standby after ORA-26040

    bas_ua
      Hi guys!

      primary db was in no force logging mode :(
      On standby db appears ORA-26040. So I'm trying to resync primary and standby db.

      I'm doing these steps:
      1. primary:
      SQL> alter database force logging;
      SQL> alter system archive log current;

      2. standby
      SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL IMMEDIATE;
      SQL> SELECT MIN(FIRST_NONLOGGED_SCN) FROM V$DATAFILE WHERE FIRST_NONLOGGED_SCN>0;

      -- got some SCN

      3. primary
      RMAN> BACKUP INCREMENTAL FROM SCN <I've got from 2nd step> DATABASE FORMAT '/FRA/tmp/ForStandby_%U' tag 'FOR STANDBY';

      4. copy backupsets from primary to standby

      5. standby
      RMAN> CATALOG START WITH '/FRA/tmp/ForStandby_';
      RMAN> RECOVER DATABASE NOREDO;

      -- OK

      6. check standby:
      SQL> SELECT FILE#, FIRST_NONLOGGED_SCN FROM V$DATAFILE WHERE FIRST_NONLOGGED_SCN > 0;

      -- here must be no rows, BUT instead of I've got SCN. This SCN greater than SCN form 1st step, but still it here!
      Why? What I did wrong?

      Edited by: bas_ua on 15.02.2013 12:05

      Edited by: bas_ua on 15.02.2013 12:06