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!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
info:oracle:rman [2013-02-04 22:17]
127.0.0.1 external edit
info:oracle:rman [2013-03-01 20:24] (current)
andunix
Line 1: Line 1:
 ====== Oracle: Recovery Manager  ====== ====== Oracle: Recovery Manager  ======
-This page was moved to http://andunix.net/info/oracle/rman+===== Start Recovery Manager =====
  
 +<code bash>
 +rman target /
 +</code>
 +
 +===== Delete Archive Logs =====
 +
 +Delete all archive logs but keep the last 45 days:
 +
 +<code sql>
 +DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE -45';
 +</code>
 +
 +To remove archive logs older than 3 days without prompting, e.g. via cron, after backup run:
 +
 +<code sql>
 +DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE -45';
 +</code>
 +
 +A sample script could be (deleting all logs except the last three days):
 +
 +<code bash>
 +#!/bin/bash
 + 
 +. ${HOME}/.profile
 + 
 +rman target / << __EOF__
 +DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE -3';
 +EXIT
 +__EOF__
 +</code>
 +
 +{{tag>admin database dba oracle rman sysadmin}}
info/oracle/rman.1360016249.txt.gz · Last modified: 2013-03-01 20:24 (external edit)