Mar 27, 2015

Troubleshoot RMAN-06214: Archivelog issues

How to Clear Obsolete archivelogs and expired archivelogs in Oracle:

RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Archive Log          12627  07-MAR-15          /u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11105_bhp4q3tb_.arc
Archive Log          12628  07-MAR-15          /u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11106_bhpcx03g_.arc
Archive Log          12629  07-MAR-15          /u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11107_bhpjbn67_.arc

-- Delete obsolete achivelogs, It may not delete expired ones

RMAN> delete noprompt obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1180 device type=DISK
Deleting the following obsolete backups and copies:
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Archive Log          12627  07-MAR-15          /u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11105_bhp4q3tb_.arc
Archive Log          12628  07-MAR-15          /u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11106_bhpcx03g_.arc
Archive Log          12629  07-MAR-15          /u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11107_bhpjbn67_.arc

RMAN-06207: WARNING: 3 objects could not be deleted for DISK channel(s) due
RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212:   Object Type   Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Archivelog      /u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11105_bhp4q3tb_.arc
RMAN-06214: Archivelog      /u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11106_bhpcx03g_.arc
RMAN-06214: Archivelog      /u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11107_bhpjbn67_.arc



RMAN> Crosscheck archivelog all;


released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1180 device type=DISK
validation failed for archived log
archived log file name=/u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11105_bhp4q3tb_.arc RECID=12627 STAMP=873750716

.....
.....

-- Delete all expired archivelogs

RMAN> delete expired archivelog all;


released channel: ORA_DISK_1

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=47 device type=DISK

List of Archived Log Copies for database with db_unique_name EHISBBS

=====================================================================

Key     Thrd Seq     S Low Time
------- ---- ------- - ---------
12627   1    11105   X 07-MAR-15 Name: /u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11105_bhp4q3tb_.arc
12628   1    11106   X 07-MAR-15 Name: /u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11106_bhpcx03g_.arc
12629   1    11107   X 07-MAR-15 Name: /u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11107_bhpjbn67_.arc


Do you really want to delete the above objects (enter YES or NO)? y

deleted archived log

archived log file name=/u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11105_bhp4q3tb_.arc RECID=12627 STAMP=873750716

deleted archived log

archived log file name=/u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11106_bhpcx03g_.arc RECID=12628 STAMP=873758072

deleted archived log

archived log file name=/u03/fast_recovery_area/EHISBBS/archivelog/2015_03_07/o1_mf_1_11107_bhpjbn67_.arc RECID=12629 STAMP=873762604

Deleted 3 EXPIRED objects


-- Now Crosscheck once

RMAN> delete expired archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=1180 device type=DISK
specification does not match any archived log in the repository


RMAN> exit


Now no expired backups.


No comments:

Post a Comment

Translate >>