Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Archivelog backup using RMAN

Status
Not open for further replies.

teakandme

MIS
Jun 10, 2004
57
US
Want to backup all archivelogs in the archivelog destination but want to retain the last 24hrs out there and delete the rest to preserve space. Will this work? Can I have multiple statements about the archivelog for each channel? In the example below, first archivelog statement backs the last 24hrs, the second backs everything else and then deletes it (which should only delete archivelogs > 24hrs) for each node. If there are any suggestions, please help!

run {
allocate channel 'dev_0' type 'sbt_tape' connect internal/oracle@cprod1
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=cprod1,OB2BARLIST=al_cprod)';
allocate channel 'dev_1' type 'sbt_tape' connect internal/oracle@cprod2
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=cprod1,OB2BARLIST=al_cprod)';
sql 'alter system archive log current';
backup incremental level <incr_level> filesperset 4
format 'al_cprod<cprod1_%s:%t:%p>.dbf'
(archivelog from time 'SYSDATE-1' like '/u02/oracle/admin/cprod/arch/cprod1/cprod%' )
(archivelog until time 'SYSDATE-1' like '/u02/oracle/admin/cprod/arch/cprod1/cprod%' delete input channel 'dev_0')
(archivelog from time 'SYSDATE-1' like '/u02/oracle/admin/cprod/arch/cprod2/cprod%' )
(archivelog until time 'SYSDATE-1' like '/u02/oracle/admin/cprod/arch/cprod2/cprod%' delete input channel 'dev_1')
;
}
 
My colleague and I worked this out and found the proper way to backup the archivelog as we wanted. The above script will not do it. We are going to use
archivelog all delete input archivelog until time 'SYSDATE';
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top