Let's see an example of configuring automatic maintenance of the archived logs on a standby database:
DB_RECOVERY_FILE_DEST
and DB_RECOVERY_FILE_DEST_SIZE
parameters:SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='/data/FRA'; SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=500G;
If we're using ASM, we can specify a disk group as DB_RECOVERY_FILE_DEST
.
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='+FRA';
LOG_ARCHIVE_DEST_1
parameter as follows so that the archived logfiles will be created at the DB_RECOVERY_FILE_DEST
parameter:SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_ FILE_DEST';
RMAN
archived log deletion policy as follows. With this setting, the applied archived logs will be automatically deleted when there is a space constraint in FRA, depending on DB_RECOVERY_FILE_DEST_SIZE
. If the archived logs are not applied, they will not be deleted.RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
Automatic deletion of archived logs in a logical standby database is already covered in Chapter 3, Configuring Oracle Data Guard Logical Standby Database, in detail.
We've mentioned methods to maintain the applied archived logfiles on the standby database. The recommended method of using FRA is described step by step. With this method, deletion of applied archived logs is maintained by Oracle and it's guaranteed that the archived logs that are not applied yet will not be deleted.