Database Reference
In-Depth Information
If you're scripting the procedure, you can specify the delete not to prompt for input:
RMAN> delete noprompt obsolete;
I usually have the DELETE NOPROMPT OBSOLETE command coded into the shell script that backs up the database.
This instructs RMAN to delete any obsolete backups and obsolete archive redo logs, as specified by the retention
policy (see the section “Segueing from Decisions to Action,” later in this chapter, for an example of how to automate
the deleting of obsolete backups with a shell script).
Clearing the Retention Policy
The default retention policy is redundancy of 1. You can completely disable the RMAN retention policy via the
TO NONE command.
RMAN> configure retention policy to none;
When the policy is set to NONE , no backups are ever considered obsolete and therefore cannot be removed via the
DELETE OBSOLETE command. This normally is not the behavior you want. You want to let RMAN delete backups per a
retention policy based on a window or number of backups.
To set the retention policy back to the default, use the CLEAR command:
RMAN> configure retention policy clear;
14. Configuring the Archive Redo Logs' Deletion Policy
In most scenarios, I have RMAN delete the archive redo logs based on the retention policy of the database backups.
This is the default behavior. You can view the database retention policy, using the SHOW command:
RMAN> show retention policy;
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
To remove archive redo logs (and backup pieces) based on the database retention policy, run the following:
RMAN> delete obsolete;
As of Oracle 11g, you can specify an archive redo log deletion policy that is separate from that of the database
backups. This deletion policy applies to archive redo logs both outside and in the FRA.
prior to oracle 11g the archive deletion policy only applied to archive redo logs associated with a
standby database.
Note
To configure an archive redo log deletion policy, use the CONFIGURE ARCHIVELOG DELETION command. The
following command configures the archive redo deletion policy so that archive redo logs aren't deleted until they have
been backed up twice to disk:
RMAN> configure archivelog deletion policy to backed up 2 times to device type disk;
 
 
Search WWH ::




Custom Search