2018-08-10

Solving the Problem: Former Primary DB cannot Flashback/Reinstate to Become Standby (ORA-38754)


The following error is listed in the DB alert log file:
2018-08-10T14:26:35.511435+02:00
FLASHBACK DATABASE TO SCN 3991690
ORA-38754 signalled during: FLASHBACK DATABASE TO SCN 3991690...


Look at the DataGuard log file
${ORACLE_BASE}/diag/rdbms/<DB_UNIQUE_NAME>/${ORACLE_SID}/trace/drc${ORACLE_SID}.log
(If you are using Trivadis' BaseEnv: cdd; cd trace; view drc${ORACLE_SID}.log)
. . .
Flashback SCN is 3991690; DB checkpoint SCN is 3991507. Flashback to SCN 3991690.
SQL Execution error=604, sql=[FLASHBACK DATABASE TO SCN 3991690]. See error stack below.
  ORA-00604: error occurred at recursive SQL level 1
  ORA-38754: FLASHBACK DATABASE not started; required redo log is not available
  ORA-38762: redo logs needed for SCN 3988974 to SCN 3991690
  ORA-38761: redo log sequence 817 in thread 1, incarnation 1 could
viability check: standby database is not viable
Unable to flashback old primary database to SCN 3991690, error = ORA-38761
Reinstatement is not possible if there are insufficient flashback logs
This database may need be to be re-created from a copy
 of the new primary database if the flashback issue cannot be resolved.
. . .


"Logon" with RMAN . . .
rman target / catalog /@<TNS-Alias to RMAN-Catalog>

. . . and restore the archive logs
RUN {
  ALLOCATE CHANNEL ch1 TYPE 'sbt_tape' PARMS="SBT_LIBRARY=/opt/hds/Base/libobk.so";
  # ALLOCATE CHANNEL ch1 TYPE disk;
  RESTORE ARCHIVELOG SCN BETWEEN 3988974 AND 3991690;
}

The DB should automatically detect the restored archive logs and be able to flashback/reinstate becoming the new standby DB.

No comments :

Post a Comment