Using RMAN Incremental Backups to Refresh Standby Database//Recover Standby Using an Incremental Backup
On standby:
SQL> SELECT CURRENT_SCN FROM V$DATABASE;
CURRENT_SCN
-----------
19432747
SQL> select min(fhscn) from x$kcvfh;
MIN(FHSCN)
----------------
19432748
[Select min of above for rman command below]
On Primary:
$ rman target /
RMAN> BACKUP INCREMENTAL FROM SCN 19432747 DATABASE FORMAT '/u02/backup/backup_%u' tag 'FORSTANDBY';
-SCP backup to standby
on Standby:
$ rman target /
RMAN> CATALOG START WITH '/u02/backup';
RMAN> RECOVER DATABASE NOREDO;
Primary:
$ rman target /
RMAN> BACKUP CURRENT CONTROLFILE FOR STANDBY FORMAT '/u02/backup/ForStandbyCTRL.bck';
-scp file to standby
Standby:
RMAN> SHUTDOWN;
RMAN> STARTUP NOMOUNT;
RMAN> RESTORE STANDBY CONTROLFILE FROM '/u02/backup/ForStandbyCTRL.bck';
RMAN> SHUTDOWN;
RMAN> STARTUP MOUNT;
RMAN> EXIT;
-on cmd prompt
$ sqlplus / as sysdba
SQL> ALTER DATABASE CLEAR LOGFILE GROUP 4;
SQL> ALTER DATABASE CLEAR LOGFILE GROUP 2;
SQL> ALTER DATABASE CLEAR LOGFILE GROUP 3;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE using current logfile DISCONNECT;
No comments:
Post a Comment