Tuesday, August 9, 2011

The keepOption


KeepOption

Purpose:
The KEEP option marks the backup or copy as exempt from the retention policy (that is, not obsolete).

Options:

KEEP: The BACKUP ... KEEP command specifies a new retention time for this backup. Use this option to create a           long-term backup, that is, a backup that want you to archive. 

FOREVER: Specifies that the backup or copy never expires.

UNTIL TIME ='date_string': Specifies the date until which the backup or copy must be kept

LOGS: Specifies that all of the archived logs required to recover this backup or copy must remain available as long       as this backup or copy is available.

NOLOGS: Specifies that this backup or copy cannot be recovered because the archived logs needed to recover this backup will not be kept.This is the only valid recoverability option when the database operates in NOARCHIVELOG mode. 

NOKEEP: Specifies that the backup or copy expires according to the user's retention policy. 


Examples:

Making a Long-Term Backup:

BACKUP DATABASE KEEP FOREVER NOLOGS;


Changing the Status of a Copy:This example specifies that any long-term image copies of datafiles and control files should obsolete now as per the existing retention policy:

CHANGE COPY OF DATABASE CONTROLFILE NOKEEP;

Enjoy:-)

No comments: