to enable the automatic maintenance of archive logs on standby database :
to enable flash recovery area and to allow the archived logs to be shipped to flash recovery area
SQL> alter system set DB_RECOVERY_FILE_DEST='/disk1/FRA';
SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE=80G;
SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST';
RMAN>configure archivelog deletion policy to applied on standby database
'when there is space pressure on FRA then the archive logs applied on standby will be automatically deleted
Rolling a standby forward using an RMAN incremental backup in 10g
=================================================================
When the standby database has fallen significantly behind the primary database and there have not been nologging operations performed on the primary database
OR
When nologging operations have been performed on the primary database and the standby database has not yet applied past the point that the nologging operations occurred
Steps
1.stop managed recovery on the physical standby database
SQL> alter database recover managed standby database cancel;
2.connect to the recovery catalog and the standby database As the target and manually catalog the standby datafiles as datafile copies
RMAN> connect catalog rman/rman@host1/rcvcat
RMAN> connect target sys/manager@host2/stby
RMAN> catalog datafilecopy
'/oracle/oradata/stdby/datafile/01_mf_system_0chdb5ab_.dbf,
/01_mf_sys_undo_0chdb6in_.dbf,
/01_mf_sysaux_0chdb5wm_.dbf,
level 0 tag 'STBY';
3.connect to the recovery catalog and the primary database as the target, and create
an incremantal level 1 backup using the datafile copies as the parent level 0
RMAN>connect catalog rman/rman@host1/rcvcat
RMAN>connect target sys/manager@host1/prod
RMAN> backup incremental level 1 tag'STBY' for recover of copy with tag 'STBY' database format '/private/backup/%u';
4.copy the newly created backup piece to the same location on the standby system
$ rcp /private/backup/<incr_backup> stby:/private/backup/
5.connect to the recovery catalog and the standby database as the target and roll the datafile copies forward
RMAN>connect catalog rman/rman@host1/rcvcat
RMAN>connect target sys/manager@host2/stby
RMAN>recover copy of database with tag 'STBY';
6.delete incremental backup and uncatalog the standby datafiles as datafile copies
RMAN> delete backup tag 'STBY';
RMAN> change copy like '/oracle/oradata/STBY/datafile/%',uncatalog
The RECOVER COPY OF DATABASE command causes the 'STBY' tag associated with the datafile copies to change to '' (NULL) or back to a previous tag, if one had existed. Use CHANGE COPY LIKE to uncatalog the standby datafiles as copies.
7.restart managed recovery
SQL> alter database recover managed standby database disconnect;
No comments:
Post a Comment