Data Guard / RMAN’ s archivelog deletion policy.


ARCHIVELOG DELETION POLICY FOR PHYSICAL STANDBY DATABASES.
SQL> set pagesize 9999
SQL> set linesize 120

SQL> select * from v$flash_recovery_area_usage;

FILE_TYPE         PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE                  0             0        0
REDO LOG                   4.02             0        4
ARCHIVED LOG              42.51             0       66
BACKUP PIECE                  0             0        0
IMAGE COPY                    0             0        0
FLASHBACK LOG                 0             0        0
FOREIGN ARCHIVED LOG          0             0        0

7 rows selected.

RMAN> configure archivelog deletion policy to applied on standby;

new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters are successfully stored

RMAN> exit


Recovery Manager complete.
[oracle@pcguy ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Oct 13 10:51:23 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> set pagesize 9999
SQL> set linesize 120


SQL> select * from v$flash_recovery_area_usage;

FILE_TYPE         PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE                      0                      0            0
REDO LOG                       4.02                      0            4
ARCHIVED LOG                  42.51                   42.5           66
BACKUP PIECE                      0                      0            0
IMAGE COPY                        0                      0            0
FLASHBACK LOG                     0                      0            0
FOREIGN ARCHIVED LOG              0                      0            0

7 rows selected.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options.
 
ARCHIVELOG DELETION POLICY FOR PRIMARY DATABASES.
[oracle@pcguy ~]$ export ORACLE_SID=TEST
[oracle@pcguy ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Oct 13 11:04:11 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> set pagesize 9999
SQL> set linesize 120
SQL> select * from v$flash_recovery_area_usage;

FILE_TYPE         PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE                  0                      0               0
REDO LOG                   4.02                      0               4
ARCHIVED LOG              42.51                   1.68              66
BACKUP PIECE                  0                      0               0
IMAGE COPY                    0                      0               0
FLASHBACK LOG             13.26                      0             145
FOREIGN ARCHIVED LOG          0                      0               0

7 rows selected.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@pcguy ~]$ rman target /

Recovery Manager: Release 11.2.0.2.0 - Production on Thu Oct 13 11:06:59 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: TEST (DBID=2121303953)

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY;

using target database control file instead of recovery catalog
old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY;
new RMAN configuration parameters are successfully stored

RMAN> exit


Recovery Manager complete.
[oracle@pcguy ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Oct 13 11:07:16 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> set pagesize 9999
SQL> set linesize 120
SQL> select * from v$flash_recovery_area_usage;

FILE_TYPE         PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE                      0                      0            0
REDO LOG                       4.02                      0            4
ARCHIVED LOG                  42.51                  42.51           66
BACKUP PIECE                      0                      0            0
IMAGE COPY                        0                      0            0
FLASHBACK LOG                 13.26                      0          145
FOREIGN ARCHIVED LOG              0                      0            0

7 rows selected.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: