User Tools

Site Tools


info:oracle:rman
Please note, that this is an old archived version of this site. Check out the new version at andunix.net!

Oracle: Recovery Manager

Start Recovery Manager

rman target /

Delete Archive Logs

Delete all archive logs but keep the last 45 days:

DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE -45';

To remove archive logs older than 3 days without prompting, e.g. via cron, after backup run:

DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE -45';

A sample script could be (deleting all logs except the last three days):

#!/bin/bash
 
. ${HOME}/.profile
 
rman target / << __EOF__
DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE -3';
EXIT
__EOF__
info/oracle/rman.txt · Last modified: 2013-03-01 20:24 by andunix