Академический Документы
Профессиональный Документы
Культура Документы
Below statements are the quick and efficient alternatives to rebuilding a physical standby database in
using RMAN incremental backups to roll forward and resynchronize a physical standby database with the
primary database
1. On the physical standby database, stop the managed recovery process (MRP):
SQL> alter database recover managed standby database cancel;
2. On the physical standby database, find the SCN which will be used for the incremental backup at
the primary database, as the backup must be created from this SCN forward.
Sql > select current_scn from v$database;
eg. 3890015
3. Using RMAN, connect to the primary database and create an incremental backup from the SCN
derived in the previous steps
oracle@host1 ~]$ rman target sys/MySysPassword@modesto
RMAN> backup incremental from scn 3890015 database format
'/u04/oracle/dg /DG_%U' tag 'FORSTANDBY';
Note:
4. Using an OS remote copy utility, transfer all backup sets created on the
primary system to the physical standby machine
[oracle@host1 ~]$ scp /u04/oracle/dg /DG_* host2:/u04/oracle/dg/
DG_2fm656du_1_1
7. Using an OS remote copy utility, transfer the standby control file backup
created on the primary system to the physical standby database machine.
[oracle@host1 ~]$ scp /u04/oracle/dg /DGCTRL.bck host2:/u04/oracle/dg /
DGCTRL.bck
9. Connect to the physical standby database using RMAN and restore the
standby control file.
RMAN> restore standby controlfile from '/u04/oracle/dg /DGCTRL.bck';
10. Shut down the physical standby database again and startup mount:
sql> shutdown;
sql> startup mount;
11. If the primary and standby database data file directories are identical, skip
this step
RMAN> catalog start with '/u02/oradata/TURLOCK/datafile/';
12. After all standby database data file copies have been cataloged, switch the standby database to
use the just-cataloged data files.
RMAN> switch database to copy;
13.On the standby database, clear all of the online redo log and standby redo
log groups
SQL> select distinct group#, type from v$logfile order by group#;
GROUP#
---------1
2
3
4
5
6
7
TYPE
------ONLINE
ONLINE
ONLINE
STANDBY
STANDBY
STANDBY
STANDBY
logfile
logfile
logfile
logfile
group
group
group
group
4;
5;
6;
7;
14. Finally, on the physical standby database, restart the managed recovery process (MRP).
SQL> alter database recover managed standby database using current logfile
disconnect;