Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

report obsolete and delete obsolete on archivelogs - archivelog not deleted.

User_UAEUZOct 3 2015 — edited Oct 5 2015

Hi all,

Sorry for the lengthy thread as I am stuck in this issue again of window recovery period.

Below is my RMAN configurations


RMAN configuration parameters for database with db_unique_name FSM1 are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO 200 G;
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/app/oracle/product/11.2.0.4/dbs/snapcf_fsm1.f';

I have a full backup done on every saturday at 0020hrs


backup incremental level 0 database tag "PRI_FFF_RMAN_BACKUP";

I have a incremental cumulative done on every other day at 0020hrs


backup incremental level 1 cumulative database tag "PRI_FFF_RMAN_BACKUP";

I have a delete obsolete script that run at 0000hrs


delete obsolete;

So, i went to do a list summary


RMAN> list backup summary;

List of Backups
===============
Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
8850478 B  0  A DISK        26-SEP-15       1       1       YES        PRI_FFF_RMAN_BACKUP
8850479 B  0  A DISK        26-SEP-15       1       1       YES        PRI_FFF_RMAN_BACKUP
8863200 B  1  A DISK        30-SEP-15       1       1       YES        PRI_FFF_RMAN_BACKUP
8863201 B  1  A DISK        30-SEP-15       1       1       YES        PRI_FFF_RMAN_BACKUP
8863246 B  F  A DISK        30-SEP-15       1       1       NO         TAG20150930T005208
8866974 B  1  A DISK        01-OCT-15       1       1       YES        PRI_FFF_RMAN_BACKUP
8866975 B  1  A DISK        01-OCT-15       1       1       YES        PRI_FFF_RMAN_BACKUP
8867020 B  F  A DISK        01-OCT-15       1       1       NO         TAG20151001T005443
8870270 B  1  A DISK        02-OCT-15       1       1       YES        PRI_FFF_RMAN_BACKUP
8870271 B  1  A DISK        02-OCT-15       1       1       YES        PRI_FFF_RMAN_BACKUP
8870314 B  F  A DISK        02-OCT-15       1       1       NO         TAG20151002T005456

And i realize that although today is 02-OCT-15 and my recovery period is just 1 but I still have 30-SEP-15 BACKUP.

So i rationalize that

1) my backup job is done on 0020

2) my delete obsolete is done on 0000hr

3) on 02-OCT-15 0000hrs, the delete obsolete will check that if I have backup fulfil the window recovey period of SYSDATE - checkpoint#backup >= 1

4) As all my backup are done on 0020hrs, naturally my 01-OCT-15 0020 backup cannot meet the window recovery period.

5)Hence the 30-SEP-15 backup is kept so that i can fallback to 01-OCT-15 0000 if need be (to fulfil the window recovery period of 1 when delete obsolete is ran)

6) However, to restore my 30-SEP-15 which is a cumulative backup, i need my level 0 backup which is on the 26-SEP-15

Hence the list backup output.

So all is good until i issue the following command below

RMAN> report obsolete; 

RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 1 days
Report of obsolete backups and copies
Type                 Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set           8863200 30-SEP-15
  Backup Piece       8863204 30-SEP-15          /opt/app/oracle/flash_recovery_area/FFF/backupset/2015_09_30/o1_mf_nnnd1_PRI_FFF_RMAN_BACKUP_c0ogl0g2_.bkp
Backup Set           8863201 30-SEP-15
  Backup Piece       8863205 30-SEP-15          /opt/app/oracle/flash_recovery_area/FFF/backupset/2015_09_30/o1_mf_nnnd1_PRI_FFF_RMAN_BACKUP_c0ohkgxq_.bkp
Backup Set           8863246 30-SEP-15
  Backup Piece       8863267 30-SEP-15          /opt/app/oracle/flash_recovery_area/FFF/autobackup/2015_09_30/o1_mf_s_891737528_c0ojgr5l_.bkp

I see that the 30-SEP-15 backup are no longer needed.

This is because

1) It is now 1:28pm, so my window recovery period of 1 will just need require to fallback to 01-OCT-15 1:28PM, which already i have 01-OCT-15 0020 hrs backup.

So the 30th backup is obsolete which again is normal.

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

What is not normal is when i do list archivelogs or check the v$archive_logs table, I still have archivelogs dated from 2015_09_29 onwards

Q1) Why ?

Q2) Does report / delete obsolete applies to archivelogs too ?

Regards,

Noob

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2015
Added on Oct 3 2015
6 comments
6,221 views