oracle10g_rman_语法测试_10

  • Use this clause in the following commands:

  • Using both RECOVERY WINDOW and REDUNDANCY clause in a single REPORT OBSOLETE or DELETE OBSOLETE command is not supported.

Keywords and Parameters

Syntax ElementDescription
RECOVERY WINDOW OF integer DAYSSpecifies that RMAN should report as obsolete those backups and copies that are not needed to recover the database to any point within the last integer days.

See Also: "CONFIGURE" for an explanation of the recovery window

REDUNDANCY = integerSpecifies the minimum level of redundancy considered necessary for a backup or copy to be obsolete. A datafile copy is obsolete if there are at least integer more recent backups or image copies of this file; a datafile backup set is obsolete if there are at least integer more recent backups or image copies of each file contained in the backup set. For example, REDUNDANCY 2 means that there must be at least two more recent backups or copies of a datafile for any other backup or copy to be obsolete.

Example

Deleting Obsolete Backups: Example The following command deletes all backups and copies not needed to recover the database to a random point within the last 30 days:

DELETE OBSOLETE RECOVERY WINDOW OF 30 DAYS;




Reporting Database Schema: Example This example, which requires a recovery catalog, reports the names of all datafiles and tablespaces one week ago:

REPORT SCHEMA AT TIME 'SYSDATE-7';

Report of database schema
File K-bytes Tablespace RB segs Datafile Name
---- ---------- -------------------- ------- -------------------
1 307200 SYSTEM *** /oracle/oradata/trgt/system01.dbf
2 20480 UNDOTBS *** /oracle/oradata/trgt/undotbs01.dbf
3 10240 CWMLITE *** /oracle/oradata/trgt/cwmlite01.dbf
4 10240 DRSYS *** /oracle/oradata/trgt/drsys01.dbf
5 10240 EXAMPLE *** /oracle/oradata/trgt/example01.dbf
6 10240 INDX *** /oracle/oradata/trgt/indx01.dbf
7 10240 TOOLS *** /oracle/oradata/trgt/tools01.dbf
8 10240 USERS *** /oracle/oradata/trgt/users01.dbf

Reporting Datafiles Needing Incremental Backups: Example This example reports all datafiles in the database that require the application of five or more incremental backups to be recovered to their current state:

REPORT NEED BACKUP INCREMENTAL 5 DATABASE;

Report of files that need more than 5 incrementals during recovery
File Incrementals Name
---- ------------ ----------------------------------------------
2 9 /oracle/oradata/trgt/undotbs01.dbf
3 9 /oracle/oradata/trgt/cwmlite01.dbf
4 9 /oracle/oradata/trgt/drsys01.dbf

Reporting Datafiles Needing Backups: Example The following example reports all datafiles from tablespace SYSTEM that will need more than two days of archived redo logs to be applied during recovery after being restored from the most recent backup:

REPORT NEED BACKUP DAYS 2 TABLESPACE SYSTEM; 

Report of files whose recovery needs more than 2 days of archived logs
File Days Name
---- ----- -----------------------------------------------------
1 3 /oracle/oradata/trgt/drsys01.dbf.f

Reporting Unrecoverable Datafiles: Example The following example reports all datafiles that cannot be recovered from existing backups because redo may be missing:

REPORT UNRECOVERABLE;

Report of files that need backup due to unrecoverable operations
File Type of Backup Required Name
---- ----------------------- -----------------------------------
1 full /oracle/oradata/trgt/system01.dbf

Reporting Obsolete Backups and Copies: Example The following example reports obsolete backups and copies with a redundancy of 1:

REPORT OBSOLETE;

Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 1 OCT 30 2001 15:54:56
Backup Piece 1 OCT 30 2001 15:54:56 /oracle/dbs/01d7t0t9_1_1
Archive Log 1 OCT 30 2001 04:52:17 /oracle/oradata/trgt/arch/archive1_21.dbf

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-615492/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9240380/viewspace-615492/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值