 |
|
Flashback Re-instantiation tips
Oracle Tips by Burleson |
Oracle 10g Flashback Re-instantiation
In an Oracle9i Data Guard environment, a failover
operation leads to a resetlogs. This operation invalidates the old
primary database. Therefore, you need to perform a hot backup on the
new primary database immediately, and then re-create a new standby
database. This operation can take a long time, and your new primary
database is vulnerable during this period.
The new Flashback Re-instantiation feature
reduces the need to reinstantiate the old primary database following
a failover. This feature allows you to quickly restore full
resiliency after a failure. This is accomplished by using the SQL
statement FLASHBACK DATABASE to roll back the old primary database
in time to synchronize with the old standby database.
Figure
12.4 Flashback Re-instantiation of Standby Database
Here are the steps to perform Flashback
Re-instantiation:
-
On your new primary database (Instance B):
SQL>
select standby_became_primary_scn from v$database;
STANDBY_BECAME_P
----------------
2960985
-
Mount the old primary database (Instance
A).
SQL>
STARTUP MOUNT
-
Flashback the old primary database
(Instance A) to the SCN.
SQL>
flashback database to scn 2960985;
-
Disable Flashback on the old primary
database (Instance A).
SQL>
ALTER DATABASE FLASHBACK OFF;
-
On the old primary database (Instance A),
create a standby control file.
SQL>
alter database create standby controlfile
as'/dba/standby/stbycf.f' reuse;
-
Shutdown the old primary database (Instance
A), and replace the control files with the new standby control
files.
SQL>
shutdown immediate;
$ cp /dba/standby/stbyct.f /u02/oradata/sid/control01.ctl
$ cp /dba/standby/stbyct.f /u02/oradata/sid/control02.ctl
-
Bring up the old primary database as a new
physical standby database (Instance A).
SQL>
startup mount;
-
Turn flashback back on the new primary
database (Instance A).
-
Oracle10g Flashback Re-instantiation
SQL> alter
database flashback on;
-
Enable transport from the new primary
database (Instance B)
-
SQL>
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_1=ENABLE;
-
On the new standby database (Instance A),
start real time apply.
-
SQL>
RECOVER MANAGED STANDBY DATABASE using current logfile
DISCONNECT;
-
The Managed Recovery process (MRP) will hit
the End-Of-Redo and then need to be restarted.
-
SQL>
RECOVER MANAGED STANDBY DATABASE using current logfile
DISCONNECT;
|