ITPub博客

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

oracle10g_rman_语法测试_10

原创 Linux操作系统 作者:wisdomone1 时间:2009-09-24 21:09:08 0 删除 编辑
  • 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 Element Description
RECOVERY WINDOW OF integer DAYS Specifies 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 = integer Specifies 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/,如需转载,请注明出处,否则将追究法律责任。

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

注册时间:2008-04-04

  • 博文量
    2164
  • 访问量
    11763923