We have a generic RMAN script that backups up most of our database, however we noticed that on one day one of the servers archive logs was increasing in size and after some investigation we found the following issue.
The Problem
RMAN> print script full_disk_disk_backup;
printing stored global script: full_disk_disk_backup
{sql ‘alter system archive log current’;
sql ‘alter database backup controlfile to trace’;
allocate channel d1 device type disk;
set command id to ‘rmanbck’;
backup spfile;
change archivelog all crosscheck;
delete noprompt expired archivelog all;
backup as compressed backupset database plus archivelog not backed up;
backup current controlfile;
resync catalog;
release channel d1;
}
RMAN> show all;
starting full resync of recovery catalog
full resync complete
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO ‘DISK’;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘/backup/AXIOMPRY/flash_recovery_area/AXIOMPRYCTL_%F’;
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM ‘AES128′; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/backup/AXIOMPRY/flash_recovery_area/SNAP_AXIOMPRY_ctl.db’;
RMAN> list backupset summary;
starting full resync of recovery catalog
full resync complete
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
——- — – – ———– ————— ——- ——- ———- —
3457626 B A A DISK 24-AUG-10 1 1 YES TAG20100824T230154
3457627 B A A DISK 24-AUG-10 1 1 YES TAG20100824T230154
3457628 B A A DISK 25-AUG-10 1 1 YES TAG20100824T230154
3457629 B A A DISK 25-AUG-10 1 1 YES TAG20100824T230154
3457630 B A A DISK 25-AUG-10 1 1 YES TAG20100824T230154
3457631 B A A DISK 25-AUG-10 1 1 YES TAG20100824T230154
3458063 B A A DISK 25-AUG-10 1 1 YES TAG20100825T020122
3465852 B A A DISK 25-AUG-10 1 1 YES TAG20100825T230130
3465932 B A A DISK 25-AUG-10 1 1 YES TAG20100825T233814
3476405 B A A DISK 26-AUG-10 1 1 YES TAG20100826T230126
3476486 B A A DISK 26-AUG-10 1 1 YES TAG20100826T233852
3489274 B A A DISK 27-AUG-10 1 1 YES TAG20100827T230206
3489275 B F A DISK 27-AUG-10 1 1 YES TAG20100827T230854
3489352 B A A DISK 27-AUG-10 1 1 YES TAG20100827T233851
3489428 B F A DISK 27-AUG-10 1 1 NO TAG20100827T233905
3498634 B A A DISK 28-AUG-10 1 1 YES TAG20100828T230147
3498635 B F A DISK 28-AUG-10 1 1 YES TAG20100828T230434
3498704 B A A DISK 28-AUG-10 1 1 YES TAG20100828T233400
3498766 B F A DISK 28-AUG-10 1 1 NO TAG20100828T233406
3498780 B F A DISK 28-AUG-10 1 1 NO TAG20100828T233412
3506694 B A A DISK 29-AUG-10 1 1 YES TAG20100829T230135
3506695 B F A DISK 29-AUG-10 1 1 YES TAG20100829T230342
3506763 B A A DISK 29-AUG-10 1 1 YES TAG20100829T233257
3506825 B F A DISK 29-AUG-10 1 1 NO TAG20100829T233304
3506839 B F A DISK 29-AUG-10 1 1 NO TAG20100829T233310
3516494 B A A DISK 30-AUG-10 1 1 YES TAG20100830T230143
3516495 B F A DISK 30-AUG-10 1 1 YES TAG20100830T231802
3516598 B A A DISK 30-AUG-10 1 1 YES TAG20100830T234835
3516669 B F A DISK 30-AUG-10 1 1 NO TAG20100830T234855
3516683 B F A DISK 30-AUG-10 1 1 NO TAG20100830T234902
3527815 B A A DISK 31-AUG-10 1 1 YES TAG20100831T230129
3527816 B F A DISK 31-AUG-10 1 1 YES TAG20100831T231507
3527909 B A A DISK 31-AUG-10 1 1 YES TAG20100831T234505
3527980 B F A DISK 31-AUG-10 1 1 NO TAG20100831T234517
3527994 B F A DISK 31-AUG-10 1 1 NO TAG20100831T234524
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 3 days
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
——————– —— —————— ——————–
Backup Set 3489275 27-AUG-10
Backup Piece 3489279 27-AUG-10 /backup/AXIOMPRY/flash_recovery_area/AXIOMPRY/AXIOMPRM/backupset/2010_08_27/o1_mf_nnndf_TAG20100827T230854_67hg77vs_.bkp
Backup Set 3489428 27-AUG-10
Backup Piece 3489430 27-AUG-10 /backup/AXIOMPRY/flash_recovery_area/AXIOMPRYCTL_c-1101749631-20100827-00
Backup Set 3498766 28-AUG-10
Backup Piece 3498768 28-AUG-10 /backup/AXIOMPRY/flash_recovery_area/AXIOMPRY/AXIOMPRM/backupset/2010_08_28/o1_mf_ncnnf_TAG20100828T233406_67l42hxr_.bkp
As we can see from the list above, we have obsolete backups from the 27 August, however we still have retained archivelogs from before the obsolete period.
We can confirm the sequences are not obsolete and since this database has a logical standby the archivelogs have been applied.
SQL> col thr form 99
col dest form 99
col seq form 9999999
col name form a40
col MB form 99,999
col “1st_time” form a21
col next_time form a21
col completed form a25
col bk form 999SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL>
SQL> select
2 dest_id dest,
3 thread# thr, sequence# seq ,status, applied, backup_count bk, to_char(first_time,’dd-mm-yyyy hh24:mi:ss’) “1st_time”
4 , to_char(next_time,’dd-mm-yyyy hh24:mi:ss’) next_time,creator , name
5 from v$archived_log
6 where sequence# between 28405 and 28414
7 order by first_time;
DEST THR SEQ S APP BK 1st_time NEXT_TIME CREATOR NAME
—- — ——– – — —- ——————— ——————— ——-
1 1 28405 D YES 0 08-08-2010 21:00:48 08-08-2010 22:07:01 ARCH
1 1 28406 D YES 0 08-08-2010 22:07:01 08-08-2010 23:01:10 ARCH
1 1 28407 D YES 0 08-08-2010 23:01:10 08-08-2010 23:01:24 ARCH
DEST THR SEQ S APP BK 1st_time NEXT_TIME CREATOR NAME
—- — ——– – — —- ——————— ——————— ——-
1 1 28408 D YES 0 08-08-2010 23:01:24 08-08-2010 23:31:11 ARCH
1 1 28409 D YES 0 08-08-2010 23:31:11 09-08-2010 05:02:21 ARCH
1 1 28410 D YES 0 09-08-2010 05:02:21 09-08-2010 07:43:02 ARCH
DEST THR SEQ S APP BK 1st_time NEXT_TIME CREATOR NAME
—- — ——– – — —- ——————— ——————— ——-
1 1 28411 A YES 0 09-08-2010 07:43:02 09-08-2010 08:49:09 ARCH
/archive/AXIOMPRY/log/1_28411_662147521.dbf
1 1 28412 A YES 0 09-08-2010 08:49:09 09-08-2010 09:31:35 ARCH
/archive/AXIOMPRY/log/1_28412_662147521.dbf
1 1 28413 A YES 0 09-08-2010 09:31:35 09-08-2010 10:04:41 ARCH
DEST THR SEQ S APP BK 1st_time NEXT_TIME CREATOR NAME
—- — ——– – — —- ——————— ——————— ——-
/archive/AXIOMPRY/log/1_28413_662147521.dbf
1 1 28414 A YES 0 09-08-2010 10:04:41 09-08-2010 10:45:15 ARCH
/archive/AXIOMPRY/log/1_28414_662147521.dbf
10 rows selected.
Solution
At the moment, why the archive logs are held onto is a mystery. However to keep the system from filling up, we can remove archivelog and backups that have exceeded the retention period.
RMAN> DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE ‘SYSDATE – 5′;
RMAN> DELETE NOPROMPT BACKUP COMPLETED BEFORE ‘SYSDATE – 5′;























Recent Comments