Description of change.gif follows
Description of the illustration change.gif


Description of maintspec.gif follows
Description of the illustration maintspec.gif


To make the following changes:

  • To change the status of backups, copies, and archived logs in the repository to AVAILABLE or UNAVAILABLE. This feature is useful when a previously unavailable file is made available again, or you do not want a specific backup or copy to be eligible to be restored but also do not want to delete it.

  • To alter the repository status of usable backups and copies from prior incarnations.

  • To remove catalog records for backups and copies, and update the corresponding records in the target control file to status DELETED. This feature is useful when you remove a file by using an operating system command rather than the RMAN CHANGE command, and want to remove its repository record as well.

  • To specify that a backup or copy should either abide by the currently configured retention policy or be exempt from it.

    See Also:

    Oracle Database Backup and Recovery Basics to change the availability status of a backup or copy

Restrictions and Usage Notes

  • The target instance must be started.

  • The KEEP FOREVER clause requires use of a recovery catalog.

  • You cannot use CHANGE... UNAVAILABLE or KEEP attributes for files stored in the flash recovery area.

  • The only CHANGE command that requires either a manual or automatic maintenance channel is the CHANGE ... AVAILABLE command. However, a maintenance channel is not required when CHANGE ... AVAILABLE is used with a file that is disk only (that is, an ARCHIVELOG, DATAFILECOPY, or CONTROLFILECOPY).

    If you use CHANGE ... AVAILABLE on files that are not disk-only, and have objects created on device types that are not configured for automatic channels, then issue manual maintenance commands on these channels. For example, if you created a backup on an sbt channel, but have only a DISK channel automatically configured, then you must manually allocate an sbt channel before CHANGE ... AVAILABLE can operate on the backup.

Keywords and Parameters

To obtain the primary keys of the records whose status you want to change, run a LIST command or query the recovery catalog views.

Syntax Element Description
maintSpec Specifies which files you want to CHANGE. Refer to "maintSpec" for descriptions of the options in this caluse.
AVAILABLE Changes the status of a backup or copy to AVAILABLE in the repository. View the status in the LIST output or recovery catalog views.
keepOption Changes the exemption status of a backup or copy in relation to the configured retention policy. For example, specify CHANGE ... NOKEEP to make a backup that is currently exempt from the retention policy eligible for OBSOLETE status.

You can also specify KEEP in the backupSpec clause.

Note: You cannot use keepOption with flash recovery area files.

See Also: "keepOption"

UNAVAILABLE Changes the status of a backup or copy to UNAVAILABLE in the repository. View the status in the LIST output or recovery catalog views. This option is provided for cases when the file cannot be found or has migrated offsite. RMAN does not use a file that is marked UNAVAILABLE in a RESTORE or RECOVER command. If the file is later found or returns to the main site, then use the AVAILABLE option to update its status.
UNCATALOG Removes references to a datafile copy, backup piece, or archived redo log from the recovery catalog, and updates records in the target control file to status DELETED. The CHANGE ... UNCATALOG command does not touch physical backups and copies. Use this command to notify RMAN when a file is deleted by some means other than a DELETE command.

Caution: If you resynchronize from a backup control file, or upgrade the recovery catalog, then records previously removed from the RMAN repository with CHANGE... UNCATALOG may reappear in the recovery catalog.

DEVICE TYPE deviceSpecifier Executes the CHANGE for the specified device type only (see "deviceSpecifier"). This option is valid only if you have configured automatic channels and have not manually allocated channels. For example, if you run CHANGE UNCATALOG...DEVICE TYPE DISK, then RMAN only uncatalogs files on disk.


Updating Backups to Status UNAVAILABLE: Example This example changes the status of backup set 100 as well as all backups of server parameter files created more than a day ago to UNAVAILABLE:


You do not need to allocate a maintenance channel.

Uncataloging and Cataloging Archived Logs: Example In this example, you move all archived logs to a new directory, uncatalog them, and then recatalog them in the new location:

HOST 'mv $ORACLE_HOME/oradata/trgt/arch/* /fs2/arch';

Changing the Retention Status of a Backupset: Example This example, which requires a recovery catalog, changes an ordinary backup into a long-term backup:

CHANGE BACKUP TAG 'consistent_db_bkup'