oracle10g_rman_語法測試_8

wisdomone1發表於2009-09-23

Keywords and Parameters

Syntax Element Description
KEEP Overrides any configured retention policy for this backup or copy so that the backup is not obsolete. 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. You must use a recovery catalog when FOREVER is specified, because the backup records eventually age out of the control file.
UNTIL TIME = 'date_string' Specifies the date until which the backup or copy must be kept. You can either specify a specific time by using the current NLS_DATE_FORMAT, or a SQL date expression, such as 'SYSDATE+365'.
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. The only use for this backup or copy is to restore the database to the point in time that the backup or copy was taken. This is the only valid recoverability option when the database operates in NOARCHIVELOG mode. This option is not valid if the backup or copy is inconsistent.
NOKEEP Specifies that the backup or copy expires according to the user's retention policy. This is the default behavior. if no KEEP option is specified.

Examples

Making a Long-Term Backup: Example This example makes a long-term backup of the database and specifies that it should never become obsolete and that the logs required to recover it should not be retained:

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
BACKUP DATABASE
KEEP FOREVER NOLOGS;
ALTER DATABASE OPEN;

Changing the Status of a Copy: Example This example specifies that any long-term image copies of datafiles and control files should lose their exempt status and so become eligible to be obsolete according to the existing retention policy:

CHANGE COPY OF DATABASE CONTROLFILE NOKEEP; --nokeep就是預設的


--以上的logs就是備份或複製對應的歸檔日誌也要可用
--nologs就是用於非歸檔模式
--until time就是備份集可以一直儲存到這個時間
--keep只是針對目前你進行的備份動作進行控制
--forever用於rman catalog中,因為controlfile record最終會age out,呵呵

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-615370/,如需轉載,請註明出處,否則將追究法律責任。

相關文章