重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3028|回复: 0
打印 上一主题 下一主题

[认证考试] OCP课程38:管理Ⅰ之恢复

[复制链接]
跳转到指定楼层
楼主
发表于 2016-2-18 09:28:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

课程目标:

  • 何时需要进行恢复
  • 使用EM或者命令行进行恢复
  • 恢复控制文件,重做日志文件和数据文件

1、打开数据库

数据库启动的各个阶段:

nomount:必须要读取初始化参数文件,不检查数据文件

mount:读取初始化参数文件中指定的所有控制文件,缺少其中一个控制文件会返回错误

open:检查控制文件中指定的所有重做日志组是否至少有一个成员存在,如果缺少某一个成员,会在告警文件中标注。检查控制文件中指定的数据文件是否存在,如果数据文件以前是离线的,则不做检查,进行在线的时候再做检查。如果有一些文件不存在,只会对检查到的第一个文件返回错误,可以通过V$RECOVER_FILE动态性能视图查看所有需要介质恢复的文件。


2、保持数据库打开

数据库打开后,如果以下文件丢失会引起实例失败:

  • 任何一个控制文件
  • 属于SYSTEM或者UNDO表空间的数据文件
  • 整个重做日志组

要对以上文件进行恢复,需要使用SHUTDOWN ABORT命令关闭数据库。

属于其他表空间的数据文件损坏不会导致实例失败,可以在数据库打开的状态下进行恢复。


3、数据恢复顾问

数据恢复顾问自动收集数据失败信息,包括当前日志文件丢失,数据文件块损坏等,在数据库进程发现数据损坏前进行检测和分析。可以使用数据恢复顾问处理以下2种情况:

  • 数据文件丢失、不一致或者损坏导致不能启动数据库
  • 在数据库运行时出现文件损坏

数据故障可以采取以下措施:

(1)如果配置了DG,切换到备库

(2)修复数据故障

可以通过EM或者RMAN使用数据恢复顾问,当前版本只支持单实例,不支持RAC,支持故障转移到备库,不支持分析和修复备库。


3、丢失控制文件

丢失控制文件分2种,一种是只丢失其中的一个,一种是丢失所有的控制文件,这里只说明丢失其中一个控制文件如何恢复。可以通过拷贝剩余的控制文件到control_files参数指定的位置进行恢复,也可以通过修改control_files,删掉失效的地址解决。

例子:ASM下丢失某一个控制文件的恢复

SQL> show parameter control_files

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

control_files                        string      +DATA/stone/controlfile/curren

                                                 t.260.893370773, +FRA/stone/co

                                                 ntrolfile/current.256.89337077

                                                 3

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

ASMCMD> rm  +FRA/stone/controlfile/current.256.893370773

SQL> startup

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

ORACLE instance started.

Total System Global Area  889389056 bytes

Fixed Size                  2258360 bytes

Variable Size             868223560 bytes

Database Buffers           12582912 bytes

Redo Buffers                6324224 bytes

ORA-00205: error in identifying control file, check alert log for more info

RMAN> restore controlfile from '+DATA/stone/controlfile/current.260.893370773';

Starting restore at 29-DEC-15

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=23 device type=DISK

channel ORA_DISK_1: copied control file copy

output file name=+DATA/stone/controlfile/current.260.893370773

output file name=+FRA/stone/controlfile/current.256.899747345

Finished restore at 29-DEC-15

SQL> alter database mount;

Database altered.

SQL> alter database open;

Database altered.


4、重做日志文件丢失

如果只是丢失重做日志组中的某一个文件,不会影响正常的实例操作,

例子:丢失某一个重做日志文件的恢复,删除重建

SQL> select l.group#,archived,member from v$log l join v$logfile f on l.group#=f.group#  order by 1;

    GROUP# ARC MEMBER

---------- --- --------------------------------------------------

         1 YES +DATA/stone/onlinelog/group_1.275.899664931

         1 YES +DATA/stone/onlinelog/group_1.261.893370775

         1 YES +FRA/stone/onlinelog/group_1.257.893370777

         2 YES +DATA/stone/onlinelog/group_2.262.893370777

         2 YES +FRA/stone/onlinelog/group_2.258.893370779

         3 NO  +DATA/stone/onlinelog/group_3.263.893370779

         3 NO  +FRA/stone/onlinelog/group_3.259.893370781

7 rows selected.

ASMCMD> rm +DATA/stone/onlinelog/group_1.261.893370775

SQL> startup

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

ORACLE instance started.

Total System Global Area  889389056 bytes

Fixed Size                  2258360 bytes

Variable Size             868223560 bytes

Database Buffers           12582912 bytes

Redo Buffers                6324224 bytes

Database mounted.

Database opened.

[oracle@oracletest1 ~]$ grep +DATA/stone/onlinelog/group_1.261.893370775 /u01/app/oracle/diag/rdbms/stone/stone/trace/alert_stone.log | grep ORA

ORA-00312: online log 1 thread 1: '+DATA/stone/onlinelog/group_1.261.893370775'

ORA-17503: ksfdopn:2 Failed to open file +DATA/stone/onlinelog/group_1.261.893370775

ORA-15012: ASM file '+DATA/stone/onlinelog/group_1.261.893370775' does not exist

ORA-00312: online log 1 thread 1: '+DATA/stone/onlinelog/group_1.261.893370775'

ORA-00312: online log 1 thread 1: '+DATA/stone/onlinelog/group_1.261.893370775'

ORA-17503: ksfdopn:2 Failed to open file +DATA/stone/onlinelog/group_1.261.893370775

ORA-15012: ASM file '+DATA/stone/onlinelog/group_1.261.893370775' does not exist

SQL> alter database drop logfile member '+DATA/stone/onlinelog/group_1.261.893370775';

Database altered.

SQL> select l.group#,archived,member from v$log l join v$logfile f on l.group#=f.group#  order by 1;

    GROUP# ARC MEMBER

---------- --- --------------------------------------------------

         1 YES +FRA/stone/onlinelog/group_1.257.893370777

         1 YES +DATA/stone/onlinelog/group_1.275.899664931

         2 YES +DATA/stone/onlinelog/group_2.262.893370777

         2 YES +FRA/stone/onlinelog/group_2.258.893370779

         3 NO  +DATA/stone/onlinelog/group_3.263.893370779

         3 NO  +FRA/stone/onlinelog/group_3.259.893370781

6 rows selected.

SQL> alter database add logfile member '+DATA' to group 1;

Database altered.

SQL> select l.group#,archived,member from v$log l join v$logfile f on l.group#=f.group#  order by 1;

    GROUP# ARC MEMBER

---------- --- --------------------------------------------------

         1 YES +DATA/stone/onlinelog/group_1.275.899664931

         1 YES +DATA/stone/onlinelog/group_1.261.899749145

         1 YES +FRA/stone/onlinelog/group_1.257.893370777

         2 YES +DATA/stone/onlinelog/group_2.262.893370777

         2 YES +FRA/stone/onlinelog/group_2.258.893370779

         3 NO  +DATA/stone/onlinelog/group_3.263.893370779

         3 NO  +FRA/stone/onlinelog/group_3.259.893370781

7 rows selected.

例子:丢失某一个重做日志文件的恢复,使用alter database clear logfile group #

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

ASMCMD> rm +DATA/stone/onlinelog/group_1.261.899749145

SQL> startup

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

ORACLE instance started.

Total System Global Area  889389056 bytes

Fixed Size                  2258360 bytes

Variable Size             868223560 bytes

Database Buffers           12582912 bytes

Redo Buffers                6324224 bytes

Database mounted.

SQL> select l.group#,archived,member from v$log l join v$logfile f on l.group#=f.group#  order by 1;

    GROUP# ARC MEMBER

---------- --- --------------------------------------------------

         1 YES +DATA/stone/onlinelog/group_1.275.899664931

         1 YES +DATA/stone/onlinelog/group_1.261.899749145

         1 YES +FRA/stone/onlinelog/group_1.257.893370777

         2 YES +DATA/stone/onlinelog/group_2.262.893370777

         2 YES +FRA/stone/onlinelog/group_2.258.893370779

         3 NO  +DATA/stone/onlinelog/group_3.263.893370779

         3 NO  +FRA/stone/onlinelog/group_3.259.893370781

7 rows selected.

SQL> alter database clear logfile group 1;

Database altered.

SQL> select l.group#,archived,member from v$log l join v$logfile f on l.group#=f.group#  order by 1;

    GROUP# ARC MEMBER

---------- --- --------------------------------------------------

         1 YES +DATA/stone/onlinelog/group_1.275.899664931

         1 YES +DATA/stone/onlinelog/group_1.261.899749329

         1 YES +FRA/stone/onlinelog/group_1.257.893370777

         2 YES +DATA/stone/onlinelog/group_2.262.893370777

         2 YES +FRA/stone/onlinelog/group_2.258.893370779

         3 NO  +DATA/stone/onlinelog/group_3.263.893370779

         3 NO  +FRA/stone/onlinelog/group_3.259.893370781

7 rows selected.

例子:丢失某一个重做日志文件的恢复,该重做日志文件处于非归档状态

SQL> select l.group#,archived,member from v$log l join v$logfile f on l.group#=f.group#  order by 1;

    GROUP# ARC MEMBER

---------- --- --------------------------------------------------

         1 NO  +DATA/stone/onlinelog/group_1.275.899664931

         1 NO  +DATA/stone/onlinelog/group_1.261.899749329

         1 NO  +FRA/stone/onlinelog/group_1.257.893370777

         2 YES +DATA/stone/onlinelog/group_2.262.893370777

         2 YES +FRA/stone/onlinelog/group_2.258.893370779

         3 YES +DATA/stone/onlinelog/group_3.263.893370779

         3 YES +FRA/stone/onlinelog/group_3.259.893370781

7 rows selected.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

ASMCMD> rm +DATA/stone/onlinelog/group_1.261.899749329

SQL> startup

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

ORACLE instance started.

Total System Global Area  889389056 bytes

Fixed Size                  2258360 bytes

Variable Size             868223560 bytes

Database Buffers           12582912 bytes

Redo Buffers                6324224 bytes

Database mounted.

Database opened.

SQL> select l.group#,archived,member from v$log l join v$logfile f on l.group#=f.group#  order by 1;

    GROUP# ARC MEMBER

---------- --- --------------------------------------------------

         1 NO  +DATA/stone/onlinelog/group_1.275.899664931

         1 NO  +DATA/stone/onlinelog/group_1.261.899749329

         1 NO  +FRA/stone/onlinelog/group_1.257.893370777

         2 YES +DATA/stone/onlinelog/group_2.262.893370777

         2 YES +FRA/stone/onlinelog/group_2.258.893370779

         3 YES +DATA/stone/onlinelog/group_3.263.893370779

         3 YES +FRA/stone/onlinelog/group_3.259.893370781

7 rows selected.

SQL> alter database clear logfile group 1;

alter database clear logfile group 1

*

ERROR at line 1:

ORA-01624: log 1 needed for crash recovery of instance stone (thread 1)

ORA-00312: online log 1 thread 1: '+FRA/stone/onlinelog/group_1.257.893370777'

ORA-00312: online log 1 thread 1: '+DATA/stone/onlinelog/group_1.275.899664931'

ORA-00312: online log 1 thread 1: '+DATA/stone/onlinelog/group_1.261.899749329'

SQL> alter system switch logfile;

System altered.

SQL> alter database clear logfile group 1;

Database altered.

SQL> select l.group#,archived,member from v$log l join v$logfile f on l.group#=f.group#  order by 1;

    GROUP# ARC MEMBER

---------- --- --------------------------------------------------

         1 YES +DATA/stone/onlinelog/group_1.275.899664931

         1 YES +DATA/stone/onlinelog/group_1.261.899750189

         1 YES +FRA/stone/onlinelog/group_1.257.893370777

         2 NO  +DATA/stone/onlinelog/group_2.262.893370777

         2 NO  +FRA/stone/onlinelog/group_2.258.893370779

         3 YES +DATA/stone/onlinelog/group_3.263.893370779

         3 YES +FRA/stone/onlinelog/group_3.259.893370781

7 rows selected.


5、非归档模式下丢失数据文件

非归档模式下任何数据文件丢失需要进行数据库完全还原,包括控制文件和数据文件,且只能还原到上次备份的时候,必须重新录入备份之后的数据。具体步骤如下:

(1)关闭实例

(2)还原整个数据库


6、归档模式下丢失非关键数据文件

如果数据库处于归档模式,则只要丢失的数据文件不属于SYSTEM和UNDO表空间的非关键文件,只影响丢失数据文件的对象,其他数据文件仍然可用。且可以恢复到最后一次提交的时候。

例子:模拟数据文件丢失或者损坏,并进行恢复

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

ASMCMD> rm +DATA/stone/datafile/tbs_2.272.899478255

SQL> startup

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

ORACLE instance started.

Total System Global Area  889389056 bytes

Fixed Size                  2258360 bytes

Variable Size             868223560 bytes

Database Buffers           12582912 bytes

Redo Buffers                6324224 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 11 - see DBWR trace file

ORA-01110: data file 11: '+DATA/stone/datafile/tbs_2.272.899478255'

SQL> select name,error from v$datafile join v$recover_file using(file#);

NAME                                     ERROR

---------------------------------------- --------------------

+DATA/stone/datafile/tbs_2.272.899478255 FILE NOT FOUND

RMAN> list failure all;

using target database control file instead of recovery catalog

List of Database Failures

=========================

Failure ID Priority Status    Time Detected Summary

---------- -------- --------- ------------- -------

616        HIGH     OPEN      29-DEC-15     One or more non-system datafiles need media recovery

RMAN> advise failure;

List of Database Failures

=========================

Failure ID Priority Status    Time Detected Summary

---------- -------- --------- ------------- -------

616        HIGH     OPEN      29-DEC-15     One or more non-system datafiles need media recovery

analyzing automatic repair options; this may take some time

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=22 device type=DISK

analyzing automatic repair options complete

Automated Repair Options

========================

Option Repair Description

------ ------------------

1      Restore and recover datafile 11

  Strategy: The repair includes complete media recovery with no data loss

  Repair script: /u01/app/oracle/diag/rdbms/stone/stone/hm/reco_882858745.hm

[root@oracletest1 ~]# cat /u01/app/oracle/diag/rdbms/stone/stone/hm/reco_882858745.hm

   # restore and recover datafile

   restore datafile 11;

   recover datafile 11;

   sql 'alter database datafile 11 online';


7、归档模式下丢失系统关键数据文件

丢失SYSTEM或者UNDO表空间的关键数据文件,需要在mount状态进行还原和恢复。

例子:模拟关键数据文件丢失或者损坏,并进行恢复

SQL> select file_name,file_id from dba_data_files where file_id=1;

FILE_NAME                                             FILE_ID

-------------------------------------------------- ----------

+DATA/stone/datafile/system.256.893370691                   1

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

ASMCMD> rm +DATA/stone/datafile/system.256.893370691

SQL> startup

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

ORACLE instance started.

Total System Global Area  889389056 bytes

Fixed Size                  2258360 bytes

Variable Size             868223560 bytes

Database Buffers           12582912 bytes

Redo Buffers                6324224 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 1 - see DBWR trace file

ORA-01110: data file 1: '+DATA/stone/datafile/system.256.893370691'

SQL> select * from v$recover_file;

     FILE# ONLINE  ONLINE_ ERROR                   CHANGE# TIME

---------- ------- ------- -------------------- ---------- ------------

         1 ONLINE  ONLINE  FILE NOT FOUND                0

RMAN> list failure all;

using target database control file instead of recovery catalog

List of Database Failures

=========================

Failure ID Priority Status    Time Detected Summary

---------- -------- --------- ------------- -------

1199       CRITICAL OPEN      29-DEC-15     System datafile 1: '+DATA/stone/datafile/system.256.893370691' is missing

RMAN> advise failure;

List of Database Failures

=========================

Failure ID Priority Status    Time Detected Summary

---------- -------- --------- ------------- -------

1199       CRITICAL OPEN      29-DEC-15     System datafile 1: '+DATA/stone/datafile/system.256.893370691' is missing

analyzing automatic repair options; this may take some time

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=22 device type=DISK

analyzing automatic repair options complete

Not all specified failures can currently be repaired.

The following failures must be repaired before advise for others can be given.

Failure ID Priority Status    Time Detected Summary

---------- -------- --------- ------------- -------

1199       CRITICAL OPEN      29-DEC-15     System datafile 1: '+DATA/stone/datafile/system.256.893370691' is missing

Optional Manual Actions

=======================

1. If file +DATA/stone/datafile/system.256.893370691 was unintentionally renamed or moved, restore it

Automated Repair Options

========================

Option Repair Description

------ ------------------

1      Restore and recover datafile 1

  Strategy: The repair includes complete media recovery with no data loss

  Repair script: /u01/app/oracle/diag/rdbms/stone/stone/hm/reco_2329703306.hm

RMAN> repair failure;

Strategy: The repair includes complete media recovery with no data loss

Repair script: /u01/app/oracle/diag/rdbms/stone/stone/hm/reco_2329703306.hm

contents of repair script:

   # restore and recover datafile

   restore datafile 1;

   recover datafile 1;

   sql 'alter database datafile 1 online';

Do you really want to execute the above repair (enter YES or NO)? yes

executing repair script

Starting restore at 29-DEC-15

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 00001 to +DATA/stone/datafile/system.256.893370691

channel ORA_DISK_1: reading from backup piece +FRA/stone/backupset/2015_12_29/nnndf0_tag20151229t162117_0.337.899742079

channel ORA_DISK_1: piece handle=+FRA/stone/backupset/2015_12_29/nnndf0_tag20151229t162117_0.337.899742079 tag=TAG20151229T162117

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:01:15

Finished restore at 29-DEC-15

Starting recover at 29-DEC-15

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 138 is already on disk as file +FRA/stone/archivelog/2015_12_29/thread_1_seq_138.339.899749511

archived log for thread 1 with sequence 139 is already on disk as file +FRA/stone/archivelog/2015_12_29/thread_1_seq_139.340.899749883

channel ORA_DISK_1: starting archived log restore to default destination

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=137

channel ORA_DISK_1: reading from backup piece +FRA/stone/backupset/2015_12_29/annnf0_tag20151229t162422_0.334.899742263

channel ORA_DISK_1: piece handle=+FRA/stone/backupset/2015_12_29/annnf0_tag20151229t162422_0.334.899742263 tag=TAG20151229T162422

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

archived log file name=+FRA/stone/archivelog/2015_12_29/thread_1_seq_137.342.899753731 thread=1 sequence=137

channel default: deleting archived log(s)

archived log file name=+FRA/stone/archivelog/2015_12_29/thread_1_seq_137.342.899753731 RECID=136 STAMP=899753730

archived log file name=+FRA/stone/archivelog/2015_12_29/thread_1_seq_139.340.899749883 thread=1 sequence=139

media recovery complete, elapsed time: 00:00:05

Finished recover at 29-DEC-15

sql statement: alter database datafile 1 online

repair failure complete

SQL> alter database open;

Database altered.


8、数据问题

数据问题包括:

  • 不可访问的组件:数据文件丢失,不正确的权限,表空间离线
  • 物理损坏:块校验失败,无效的块头值
  • 逻辑损坏:数据字典不一致,错误行块,索引目录或者事务
  • 不一致:控制文件比数据文件和联机重做日志文件新或者旧
  • I/O问题:超过最大打开文件数目限制,不可访问的通道,网络或者I/O错误

以上问题都可以使用数据恢复顾问进行分析。


9、数据恢复顾问

使用数据恢复顾问步骤如下:

(1)健康管理器自动检测并将问题记录到ADR

(2)数据恢复顾问获取问题并列出

(3)获取修复建议

(4)选择和执行修复建议

(5)验证结果,使用VALIDATE命令

RMAN> validate database;


10、评估数据问题

通过健康监视器和数据恢复顾问评估数据问题。


11、数据问题

使用检查器检测数据问题,可以自动也可以主动,当数据库出现问题时,自动进行检查,也可以通过执行类似于VALIDATE DATABASE命令主动进行检查。


12、列出数据问题

“查看和管理故障”页面是数据恢复顾问的主页,此处列出了目前的问题,与使用RMAN命令list failure all一样。可以选择“建议”,“设置优先级”以及“关闭”问题。


13、修复建议

如果在“查看和管理故障”页面点击了“建议”,则会生成手动操作建议,例如如果是重命名导致的错误,通过将名字修改正确比使用RMAN进行恢复更快。手动修复后,可以点击“重新评估故障”,解决了的故障就会被关闭。点击“继续完成建议”进入自动恢复选项,与使用RMAN命令advise failure一样。


14、执行恢复

根据恢复后打开数据库。


15、数据恢复顾问视图

V$IR_FAILURE:列出所有的问题,包括关闭的,RMAN命令LIST FAILURE的结果

V$IR_MANUAL_CHECKLIST:列出需要手动操作的建议,RMAN命令ADVISE FAILURE的结果

V$IR_REPAIR:列出自动修复建议,RMAN命令ADVISE FAILURE的结果

V$IR_FAILURE_SET:是否只能手动修复


16、相关习题:

(1)In which of the scenario will the DBA perform recovery? (Choose all that apply.)
A.  The alert log file is corrupted
B.  A tablespace is accidentally dropped
C.  One of the redo log members is corrupted
D.  A database user terminates the session abnormally
E.  The hard disk on which the data files is stored is corrupted

答案:BE

(2)Your test database is configured to run in NOARCHIVELOG mode. One of the data files in the USERS tablespace is lost due to a media failure. You notice that all the online redo logs have been overwritten since the last backup.
What would you do to recover the data file?
A.  Take the USERS tablespace offline and re-create the lost data file
B.  Shutdown the instance, restore the data file from the last consistent backup and restart the database instance
C.  Shutdown the instance, restores all the database files from the last consistent backup and restart the database instance
D.  Take the USERS tablespace offline, restore all the data files of the USERS tablespace from the last consistent backup and make the tablespace online

答案:C

(3)The instance abnormally terminates because of a power outage.
Which statement is true about redo log files during instance recovery?
A. Inactive and current redo log files are required to accomplish recovery
B. Online and archived redo files are required to accomplish instance recovery
C. All redo log entries after the last checkpoint are applied from redo log files to data files
D. All redo log entries recorded in the current log file until the checkpoint position are applied to data files

答案:C

(4)View the Exhibit to examine the error that occurred during the database startup.
You  opened  an  RMAN  session  for  the  database.  To  repair  the  failure,  you  executed  the following command as the first RMAN command:
   RMAN> REPAIR FAILURE;
Which statement describes the consequence of this command?


A.  The command performs the recovery and closes the failure
B.  The command only displays the advice and the RMAN script required for recovery
C.  The  command  executes the  RMAN  script to  repair  the failure  and  remove the  entry from the  Automatic Diagnostic Repository (ADR)
D.  The command produces an error because the ADVISE FAILURE command was not executed before the REPAIR FAILURE command

答案:D

(5)Identify two situations in which you can use Data Recovery Advisor for recovery. (Choose two.)
A.  The database files are corrupted when the database is open
B.  The user has dropped an important table that needs to be recovered
C.  The archived redo log files are missing for which the backup is not available
D.  The database is not opening because the required database files are missing

答案:AD

(6)The database instance is currently using SPFILE. View the Exhibit and examine the error that you  received  while  running  the  DB  Structure  Integrity  check.  Given  below  are  the  steps  to recover from the error in random order:

   1. Shut down the instance, if not already done.
   2. Copy one of the remaining control files to a new location.
   3.  Change  the  value of  the  CONTROL_FILES  initialization  parameter  to  correspond to the new location of the control files.
   4. Start up the database instance to the NOMOUNT stage.
   5. Recover the database to the point of failure of the control file.
   6. Open the database.
Identify the correct sequence of steps?

A.  1, 2, 4, 3, 5, 6
B.  2, 4, 3, 5, 6; 1 not required
C.  4, 5, 6, 2, 3; 1 not required
D.  5, 2, 3, 4; 1 and 6 not required

答案:A

(7)Which two activities are NOT supported by the Data Recovery Advisor (DRA)? (Choose two.)
A.  Recover from failures in the RAC environment.
B.  Diagnose and repair a data file corruption online.
C.  Diagnose and repair a data file corruption offline.
D.  Diagnose and repair failures on a standby database.

答案:AD

(8)Given below is a list of scenarios:
   1. A user terminates his session abnormally.
   2. The connection between the server and the client application terminates because of a network failure.
   3. A schema is accidentally dropped.
   4. The tablespace is accidentally dropped from the database.
   5. The hard disk gets corrupted and the data files in the disk are lost.
   6. The database instance abnormally shuts down because of power failure.
Which scenarios require DBA intervention to perform recovery?
A. 1, 3, and 6
B. 4, 5, and 6
C. 3, 4, and 5
D. 1, 2, and 6

答案:C

(9)Which two kinds of  failures make the Data Recovery Advisor (DRA) generate a manual checklist? (Choose two.)
A.  Failure when no standby database is configured
B.  Failure because a data file is renamed accidentally
C.  Failure that requires no archive logs to be applied for recovery
D.  Failure due to loss of connectivity-for example, an unplugged disk cable

答案:BD

(10)In which of the scenario will the DBA perform recovery? (Choose all that apply.)
A.  The alert log file is corrupted
B.  A tablespace is accidentally dropped
C.  One of the redo log members is corrupted
D.  A database user terminates the session abnormally
E.  The hard disk on which the data files is stored is corrupted

答案:BE


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-5-8 02:28 , Processed in 0.100220 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表