Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> difficult RMAN archivelog requirements

difficult RMAN archivelog requirements

From: Oxnard <shankeypNO_SPAM_at_comcast.net>
Date: Sat, 12 Feb 2005 12:56:34 -0600
Message-ID: <JsudnZ9vlqP5zJPfRVn-3A@comcast.com>


The db version is 9205.

I am have trouble meeting a archived log backup requirements. There are several
parts of the requirements.

The archived log job (alj) is run once an hour via a scheduler.

The archived log files are left on the system for a period of one day.

The newest archived log files, that is archive log files created since the last run of the alj, are backed up to tape.

The archived log files older than one day are removed from the system via RMAN. There can be no use of a RMAN catalog. It must be done within the control file.

There needs to be at most two copies of the archived log files on tape.

I have tried a couple of ways but seem to always run into issues/problems.

To test it out I setup a simple RMAN backup to disk, however in production it
will go to tape.

The first attempt was
run{
allocate channel ch1 device type disk;
backup
  archivelog all delete input until time 'sysdate - 1'  tag = 'archivelog files'
 format 'C:\t\%d_archivelog_%U_%t.bkp';
}

this command failed with a syntax error.

After quite a bit of reading and trying different combinations of commands I came up with:
run{
allocate channel ch1 device type disk maxpiecesize = 1999M; sql 'alter system switch logfile';

backup
  archivelog from time 'sysdate - 1'
  skip inaccessible
 tag = 'archivelog files'
 format 'C:\t\%d_archivelog_%U_%t.bkp';

backup
  archivelog until time 'sysdate - 1' delete input   skip inaccessible
 tag = 'archivelog files'
 format 'C:\t\%d_archivelog_%U_%t.bkp';
}

This is as close as I got but it has some issues.

There will be up to 24 copies of a single archived log file. I tried working with the 'copies' option, however I found it was really refering to the number
of backup pieces not the indivigual archived log file.

The first backup statement will work. As I do a log switch before the backup.
However the second may fail if there is not a logfile older than 1 day. This is an issue as I grep for RMAN-00569 in the log file generated. Thus I would get a true error but not really one I'm looking for.

If anyone knows of a good way to do this please share it.

Thanks
Ox Received on Sat Feb 12 2005 - 12:56:34 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US