19 | 03 | 2024
Latest Articles
Popular Articles

Data Guard

Data Guard : Adjust RMAN' s archivelog deletion policy

User Rating:  / 4
PoorBest 

Data Guard : Adjust RMAN' s archivelog deletion policy.

 

New in Oracle 10G is the RMAN archive log deletion policy to APPLIED ON STANDBY

New in Oracle 11G is the RMAN archive log deletion policy to SHIPPED TO ALL STANDBY

 

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=SILVER
[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: SILVER (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.

 

See also Manage the archive logs using RMAN

See also Archive logs in the flash recovery area