Databases Reference
In-Depth Information
You can execute RMAN commands such as backup and restore on any backup accessible in a Data Guard
environment. Let's say you have a primary database named PROD and a standby database named stdby1 living on
two different hosts. Let's say data file 1 is backed up to disk as well as to tape on the standby host. If you connect to
RMAN with the PROD database as the target, you can access the tape backup of data file 1 but not the disk backup of
data file 1 made on the standby database server stdby1. However, you can restore the tape backup of data file 1 made
on the stdby1 database on the primary database.
Reinstating a Physical Standby Using RMAN Backups
Problem
You want to reinstate the primary database with the help of RMAN backups, following a Data Guard failover.
Solution
The following applies to all database versions 10.2.0.2 and higher. You must first ensure that you have backups for all
data files. You must also have the standby control file backups, taken at the failed primary database with the alter
database create standby controlfile command following a database backup. Here are the steps to follow to
reinstate the primary database after a failover:
1.
Get the standby_become_primary_scn from the new primary database, following the Data
Guard failover:
SQL> select to_char(STANDBY_BECAME_PRIMARY_SCN) from v$database;
2.
Delete all archive logs created at or after the failover operation on the failed primary
database. Issue the following command to delete the divergent archived logs from the fast
recovery area:
RMAN> delete archivelog from scn standby_become_primary_scn;
3.
Restore the original failed primary database from backups:
RMAN> restore database;
4.
Using the physical standby control file, start up the standby database:
SQL> startup mount
If you must restore the standby database's control file backup, make sure that the
initialization file you use points to the standby control file. If you don't have a standby
control file from the failed primary database, you must do the following:
a.
Clean up the fast recovery area.
b.
Create a new standby control file from the new primary database.
c.
Using the new standby control file, restart the new standby database.
d.
Rename all the data and log files.
 
Search WWH ::




Custom Search