ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle10g_rman_语法测试_8

oracle10g_rman_语法测试_8

原创 Linux操作系统 作者:wisdomone1 时间:2009-09-23 02:16:51 0 删除 编辑

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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb qq: 305076427 微博: wisdomone9

注册时间:2008-04-04

  • 博文量
    2151
  • 访问量
    11789214