RMAN - archivelog deletion policy not working. [message #567731] |
Thu, 04 October 2012 11:27 |
dmarcus48
Messages: 44 Registered: May 2008 Location: Central NJ
|
Member |
|
|
Hello guys,
I'm on a Windows server 2003 R2 64 bit, database is 11.1.0.7. From RMAN connected to the target and the catalog, this is a show all;
RMAN> show all;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'F:\oracle\admin
\ORCL\backup\%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 2;
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT 'F:\oracle\admin\ORCL\backup\%d
-%T-%t';
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM 'AES128';
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DISK;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'F:\ORACLE\ADMIN\ORCL\BACKUP\CFSS.TRC'
I'm running incremental backups, a level 0 on sunday and a level 1 the other days of the week, this is the ctl file:
LEVEL 0:
connect target /@ORCL
connect catalog rman/rmanpw@rmancat
RUN
{
sql 'alter session set nls_date_format="DD-MON-YYYY HH24:MI:SS"';
crosscheck archivelog all;
crosscheck backup;
delete force noprompt obsolete;
delete force noprompt expired backup;
sql 'alter system archive log current';
allocate channel c1 device type disk format 'F:\oracle\admin\ORCL\backup\%U';
backup AS COMPRESSED BACKUPSET incremental level 0 database plus archivelog delete input;
backup current controlfile;
restore validate database;
}
list backup summary;
list backupset;
list backup of controlfile;
exit;
;
LEVEL 1:
connect target /@ORCL
connect catalog rman/rmanpw@rmancat
RUN
{
sql 'alter session set nls_date_format="DD-MON-YYYY HH24:MI:SS"';
crosscheck archivelog all;
crosscheck backup;
delete force noprompt obsolete;
delete force noprompt expired backup;
sql 'alter system archive log current';
allocate channel c1 device type disk format 'F:\oracle\admin\ORCL\backup\%U';
backup AS COMPRESSED BACKUPSET incremental level 1 database plus archivelog;
backup current controlfile;
restore validate database;
}
list backup summary;
list backupset;
list backup of controlfile;
exit;
The level 0 does delete the archive logs (because of the delete input). Each backupset has two copies of the archive logs (which is what I want), and I expected the logs to be deleted after being backed up 2 days (each day is twice, 2 days = 4 times). But it's not deleting the logs, even after 6 runs.
Any one have any ideas?
TIA
Dave
|
|
|
|
Re: RMAN - archivelog deletion policy not working. [message #567735 is a reply to message #567732] |
Thu, 04 October 2012 12:58 |
dmarcus48
Messages: 44 Registered: May 2008 Location: Central NJ
|
Member |
|
|
I thought I answered this but oh well. I'm trying to test out the archive deletion policy, is there anyway I can do this? I've tried to set the retention policy to none. I want to see the archivelogs get deleted automatically. What I get is this:
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=D:\ORACLE\FLASH_RECOVERY_AREA\ORCL\ARCHIVELOG\ARC00128_0795700667.001
And this is after running the level 1 several times. My configuration now looks like this:
RMAN> show all;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO NONE;
CONFIGURE BACKUP OPTIMIZATION OFF;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'F:\oracle\admin\ORCL\backup\%f';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 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 CHANNEL 1 DEVICE TYPE DISK FORMAT 'F:\oracle\admin\ORCL\backup\%-%T-%t';
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE ENCRYPTION FOR DATABASE OFF;
CONFIGURE ENCRYPTION ALGORITHM 'AES128';
CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DISK;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'F:\ORACLE\ADMIN\ORCL\BACKUP\CFSS.TRC
;
Thanks again.
Dave
|
|
|
|
Re: RMAN - archivelog deletion policy not working. [message #567801 is a reply to message #567769] |
Fri, 05 October 2012 08:27 |
dmarcus48
Messages: 44 Registered: May 2008 Location: Central NJ
|
Member |
|
|
Thanks if you look above you'll see that I had already configured it. I believe this is a retention policy link or a flashback_recovery issue. I ran the backup this morning and it deleted SOME of the logs. So this issue is closed.
Thanks for all who tried to help.
Dave
|
|
|