This shows you the differences between two versions of the page.
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:// | + | ===== Start Recovery Manager ===== |
+ | <code bash> | ||
+ | rman target / | ||
+ | </ | ||
+ | |||
+ | ===== Delete Archive Logs ===== | ||
+ | |||
+ | Delete all archive logs but keep the last 45 days: | ||
+ | |||
+ | <code sql> | ||
+ | DELETE ARCHIVELOG ALL COMPLETED BEFORE ' | ||
+ | </ | ||
+ | |||
+ | 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 ' | ||
+ | </ | ||
+ | |||
+ | A sample script could be (deleting all logs except the last three days): | ||
+ | |||
+ | <code bash> | ||
+ | #!/bin/bash | ||
+ | |||
+ | . ${HOME}/ | ||
+ | |||
+ | rman target / << __EOF__ | ||
+ | DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE ' | ||
+ | EXIT | ||
+ | __EOF__ | ||
+ | </ | ||
+ | |||
+ | {{tag> |