Home » RDBMS Server » Backup & Recovery » RMAN - archivelog deletion policy not working. (Windows 2003 R2 64 bit, Oracle 11.1.0.7)
RMAN - archivelog deletion policy not working. [message #567731] Thu, 04 October 2012 11:27 Go to next message
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 #567732 is a reply to message #567731] Thu, 04 October 2012 11:35 Go to previous messageGo to next message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
Your recovery window of 3 days means you will not get the archivelogs deleted for at least that long.
Re: RMAN - archivelog deletion policy not working. [message #567735 is a reply to message #567732] Thu, 04 October 2012 12:58 Go to previous messageGo to next message
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 #567769 is a reply to message #567735] Fri, 05 October 2012 03:49 Go to previous messageGo to next message
howtodba
Messages: 4
Registered: September 2012
Location: Bucharest / Romania
Junior Member
Archive log deletion is additional to retention policy, and should be configured.
Below is an example:

-- # Configure Archive log Deletion policies
-- # ---------------------------------------
-- * will delele archives from FRA or from outside FRA
-- * archives outside of FRA will be deleted only with: DELETE OBSOLETE or DELETE ARCHIVELOG
-- 
-- CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DEVICE TYPE DISK;

Re: RMAN - archivelog deletion policy not working. [message #567801 is a reply to message #567769] Fri, 05 October 2012 08:27 Go to previous message
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
Previous Topic: RMAN-04002: ocipi failed, ORA--1
Next Topic: oracle disaster recovery
Goto Forum:
  


Current Time: Thu Nov 21 12:04:26 CST 2024