[每日一题] 11gOCP 1z0-053 :2013-10-6 significance of the CHANGE FAILURE ..................25
:http://blog.csdn.net/guoyjoe/article/details/12361287
来自官方对CHANGE FAILURE command的语法解释,如下图所示:
changeFailure
FAILURE command to show the list of failures.
Syntax Element | Description |
| Enables you to change priority or close failures recorded in the Automatic Diagnostic Repository. By default RMAN prompts for confirmation before performing the requested change. The target database to which RMAN is connected must be a single-instance database and must not be a physical standby database. |
| Changes only open failures. |
| Changes only critical failures. |
| Changes only failures with |
| Changes only failures with |
| Changes only the specified failure. |
| Excludes the specified failures from the change. |
实验测试:
1、 用rman登录备份数据库
[oracle@mydb ~]$ rman target / Recovery Manager: Release 11.2.0.3.0 - Production on Sun Oct 6 22:36:36 2013 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: OCM (DBID=2206937749) RMAN> LIST FAILURE; using target database control file instead of recovery catalog no failures found that match specification RMAN> backup database; Starting backup at 06-OCT-13 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=145 device type=DISK channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00001 name=/u01/app/oracle/oradata/ocm/system01.dbf input datafile file number=00002 name=/u01/app/oracle/oradata/ocm/sysaux01.dbf input datafile file number=00005 name=/u01/app/oracle/oradata/ocm/example01.dbf input datafile file number=00003 name=/u01/app/oracle/oradata/ocm/undotbs01.dbf input datafile file number=00006 name=/u01/app/oracle/oradata/ocm/gyj01.dbf input datafile file number=00007 name=/u01/app/oracle/oradata/ocm/gyj02.dbf input datafile file number=00008 name=/u01/app/oracle/oradata/ocm/tp01.dbf input datafile file number=00009 name=/u01/app/oracle/oradata/ocm/mrkt01.dbf input datafile file number=00004 name=/u01/app/oracle/oradata/ocm/users01.dbf channel ORA_DISK_1: starting piece 1 at 06-OCT-13 channel ORA_DISK_1: finished piece 1 at 06-OCT-13 piece handle=/u01/app/oracle/product/11.2.0/dbs/14olopg6_1_1 tag=TAG20131006T223654 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55 Finished backup at 06-OCT-13 Starting Control File and SPFILE Autobackup at 06-OCT-13 piece handle=/backup/rman/c-2206937749-20131006-00 comment=NONE Finished Control File and SPFILE Autobackup at 06-OCT-13
[root@mydb 6446]# rm -rf /u01/app/oracle/oradata/ocm/gyj02.dbf
RMAN> shutdown abort; Oracle instance shut down
4、
RMAN> CHANGE FAILURE 2002 PRIORITY LOW; List of Database Failures ========================= Failure ID Priority Status Time Detected Summary ---------- -------- --------- ------------- ------- 2002 HIGH OPEN 06-OCT-13 One or more non-system datafiles are missing Do you really want to change the above failures (enter YES or NO)? y changed 1 failures to LOW priority
RN> change failure all closed; List of Database Failures ========================= Failure ID Priority Status Time Detected Summary ---------- -------- --------- ------------- ------- 2002 LOW OPEN 06-OCT-13 One or more non-system datafiles are missing Do you really want to change the above failures (enter YES or NO)? Y closed 1 failures
RMAN> LIST FAILURE; List of Database Failures ========================= Failure ID Priority Status Time Detected Summary ---------- -------- --------- ------------- ------- 2002 HIGH OPEN 06-OCT-13 One or more non-system datafiles are missing RMAN> advise failure; List of Database Failures ========================= Failure ID Priority Status Time Detected Summary ---------- -------- --------- ------------- ------- 2002 HIGH OPEN 06-OCT-13 One or more non-system datafiles are missing analyzing automatic repair options; this may take some time using channel ORA_DISK_1 analyzing automatic repair options complete Mandatory Manual Actions ======================== no manual actions available Optional Manual Actions ======================= 1. If file /u01/app/oracle/oradata/ocm/gyj02.dbf was unintentionally renamed or moved, restore it Automated Repair Options ======================== Option Repair Description ------ ------------------ 1 Restore and recover datafile 7 Strategy: The repair includes complete media recovery with no data loss Repair script: /u01/app/oracle/diag/rdbms/ocm/ocm/hm/reco_2745581618.hm RMAN> repair failure; Strategy: The repair includes complete media recovery with no data loss Repair script: /u01/app/oracle/diag/rdbms/ocm/ocm/hm/reco_2745581618.hm contents of repair script: # restore and recover datafile restore datafile 7; recover datafile 7; sql 'alter database datafile 7 online'; Do you really want to execute the above repair (enter YES or NO)? y executing repair script Starting restore at 06-OCT-13 using channel ORA_DISK_1 channel ORA_DISK_1: starting datafile backup set restore channel ORA_DISK_1: specifying datafile(s) to restore from backup set channel ORA_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/ocm/gyj02.dbf channel ORA_DISK_1: reading from backup piece /u01/app/oracle/product/11.2.0/dbs/14olopg6_1_1 channel ORA_DISK_1: piece handle=/u01/app/oracle/product/11.2.0/dbs/14olopg6_1_1 tag=TAG20131006T223654 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:00:03 Finished restore at 06-OCT-13 Starting recover at 06-OCT-13 using channel ORA_DISK_1 starting media recovery media recovery complete, elapsed time: 00:00:01 Finished recover at 06-OCT-13 sql statement: alter database datafile 7 online repair failure complete Do you want to open the database (enter YES or NO)? y database opened
答案A正确,CHANGE FAILURE 命令更改为LOW 和从LOW 更改为HIGH;
答案B不正确,CHANGE FAILURE 命令改变了级别后,就不能在修复范围之内了。
答案C不正确,CHANGE FAILURE 命令用于更改故障优先级或关闭一个或多个故障,更改为LOW 和从LOW 更改为HIGH。当更改CRITICAL 优先级时会出现错误。
答案D正确,
QQ:252803295
DSI&Core Search Ⅱ 群:177089463(1000人技术群:未满)
DSI&Core Search Ⅲ 群:284596437(500人技术群:未满)
DSI&Core Search Ⅳ 群:192136702(500人技术群:未满)
DSI&Core Search Ⅴ 群:285030382(500人闲聊群:未满)
MAIL:
BLOG:
WEIBO:
ITPUB:
OCM: http://education.oracle.com/education/otn/YGuo.HTM