Monday, June 2, 2008

Maintenance Commands

RMAN provides several commands that can be used for maintenance:


Script: maintenance_commands.rcv
run {
# -----------------------------------------------------------
# Verify that all backups on the backup media are intact
# -----------------------------------------------------------
CROSSCHECK BACKUP OF DATABASE;

# -----------------------------------------------------------
# Display a list of files that need to be backed up based on
# the retention policy. For this case study, files that don't
# have at least 2 backups will be reported.
# -----------------------------------------------------------
REPORT NEED BACKUP;

# -----------------------------------------------------------
# Delete any un-necessary backups. This command deletes backups
# based on the retention policy you configured. For this case study, all
# backups older than the 2 most recent backups of each
# datafile will be deleted.
# -----------------------------------------------------------
DELETE OBSOLETE;

# -----------------------------------------------------------
# Get a complete summary list of existing backups.
# -----------------------------------------------------------
LIST BACKUP SUMMARY;
}

No comments: