Monday, March 29, 2010

Maintenance Of Archivelogs On Standby Databases

Applies to:
Oracle Server - Enterprise Edition - Version: 10.1.0.0 to 11.1
Information in this document applies to any platform.

Goal
Maintenance of archivelogs which are already applied on standby database in Oracle 10g

Solution
In Oracle 10g, RMAN has a specific configuration for archivelog deletion policy i.e.
ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY
This parameter can be set on primary and standby databases.  
To enable automatic maintenance of the archivelogs on standby perform the below steps on standby database :
Step 1 :  Enable the flash recovery area on the standby database so that all the archivelogs are shipped in the flash recovery area.
Example : 
To enable Flash Recovery Area and to allow the archivelogs to be shipped to Flash Recovery Area set the below parameters
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';

Step 2 : Set the parameter Archive log deletion policy to applied on standby
Example :
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;

Note : With the above settings whenever there is a space pressure in Flash Recovery Area all the archivelogs that are applied on standby database will be automatically deleted.

References
Oracle Metalink Doc ID 464668.1

2 comments:

  1. clear and excellent explanation

    ReplyDelete
  2. Hello,

    Just confirming my understanding. If i set below parameter in the rman of the standby database(which is in mount state), it will
    only the delet thearchives from standby server(LOG_ARCHIVE_DEST_2).


    It will not effect the archives on primary server (LOG_ARCHIVE_DEST_1).

    CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;


    Thanks & Regards,
    Deepak Jha

    ReplyDelete