 |
|
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).
Get the complete Oracle10g story:
To get the code instantly, click here:
Need an Oracle Mentor?
BEI is now offering personal mentors for Oracle DBAs where you can have an
Oracle expert right at your fingertips, anytime day or night. We work with
hundreds of Oracle databases every year, so we know exactly how to quickly
assist you with any Oracle question.
Why risk an unplanned outage? You can now get telephone access to Don
Burleson or any of his Oracle Certified DBAs with more than 20 years of
full-time IT experience. Click here for details:
http://www.dba-oracle.com/service_oracle_backup.htm

|