DBAtlas · Database operations atlas

Recover the old primary as a standby after a failover (REINSTATE)

OracleData Guard

Command

# 1) Bring the old primary to MOUNT (sqlplus / as sysdba):
#    SQL> STARTUP MOUNT;
#    (RAC: srvctl start database -db <old_primary_db_unique_name> -startoption mount)
# 2) From DGMGRL connected to the new primary:
dgmgrl sys@<new_primary_db_unique_name>
REINSTATE DATABASE '<old_primary_db_unique_name>';
# 3) Verify:
SHOW CONFIGURATION;
SHOW DATABASE '<old_primary_db_unique_name>';

What it does

Flashes the old primary back to before the failover SCN with flashback database, converts it to a physical standby and starts receiving redo from the new primary; no need to rebuild the standby from scratch.

When to use it

After a failover, once the old primary server/storage is reachable again; after an FSFO automatic failover (the observer usually reinstates it by itself).

Caution

Flashback must have been enabled on the old primary BEFORE the failover and the flashback logs must cover the failover SCN (db_flashback_retention_target, FRA size); otherwise the reinstate fails and the standby must be rebuilt with RMAN duplicate. Data written to the old primary after the failover is permanently lost.

Open in DBAtlas →

Related