11gOCP精解 之 01
Identify two situations in which you can use Data Recovery Advisor for recovery. (Choose two.)
A. The user has dropped an important table that needs to be recovered.
B. The database files are corrupted when the database is open.
C. You are not able to start up the database instance because the required database files are missing.
D. The archived log files are missing for which backup is not available.
Answer: B,C
Explanation:
Normal
0
7.8 磅
0
2
false
false
false
EN-US
ZH-CN
X-NONE
Data Recovery Advisor是oracle 11g推出且歸屬於rman的一種新特性,它是Oracle 11g
Database 所推出的一種故障解決工具, 具有自動化得故障檢測、故障定位、提出最優解決方案、按照使用者的需求執行解決方案等功能;通常應用在資料檔案腐壞或者磁碟上的永久資料丟失等極端環境中;透過提供一種集中式的自動的資料恢復工具,Data Recovery Advisor大大提高了資料庫的易管理和可靠性,同時可以縮減MTTR(Mean Time To Repair 平均恢復時間); Data Recovery Advisor具有如下優於傳統恢復技術的特點: 1. Data Recovery Advisor可以在資料庫程式發現錯誤前進行探測、分析、修復資料等操作,同時發錯警告資訊。預警資訊可以有效的遏制由於腐壞導致的損害 2.
Data Recovery Advisor 可以自動的分析失敗資訊,同時評估其影響,並且將報告傳送給使用者。這種自動化評估方式優於手動的錯誤統計方式,省時且高效 3.
以前,使用者必須手動的透過修復可能帶來的影響來確定修復選項,當遇到多種錯誤同時發生時,使用者必須手動的確定正確恢復順序。作為對比Data Recovery Advisor 可以自動化處理以上問題,既可以做出最好的恢復選項,又可以檢測在你的計算機環境中最可行方案 4.
執行一個資料恢復可能是複雜且易出錯的過程,當我們選擇Data Recovery Advisor來執行一個自動化的恢復時可以同時驗證其是否成功 實驗: 模擬錯誤:將system01.dbf 重名名 實驗前提:使用oracle11g資料庫,保證資料庫已經使用rman備份 實驗內容: 1、常用指令介紹 Data Recovery Advisor 使用如下命令進行管理LIST FAILURE, ADVISE FAILURE, REPAIR FAILURE, and CHANGE FAILURE list檢視failure也可以包含多種子查詢相關指令的使用方法可以檢視官方文件,例如: RMAN> LIST
FAILURE ALL; ··· Lists failures
with all priorities and status OPEN. RMAN>
LIST FAILURE CRITICAL; ··· Lists only
critical failures with status OPEN. RMAN>
LIST FAILURE HIGH; ··· Lists only
failures with HIGH priority and status OPEN. RMAN>
LIST FAILURE LOW; ··· Lists only
failures with LOW priority with status OPEN. RMAN>
LIST FAILURE CLOSED; ··· Lists only
closed failures. RMAN>
LIST FAILURE failureNumber; ··· Specifies the failures by
failure number. RMAN>
LIST FAILURE DETAIL; ··· Lists failures by expanding the consolidated
failure. For example, if multiple block corruptions existed in a file, then
specifying the DETAIL option would list each of the block
corruption. 2、關閉資料庫重新命名system01.dbf檔案 SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL>!mv /u01/app/oracle/oradata/oracle11g/system01.dbf
/u01/app/oracle/oradata/oracle11g/system01.dbf_bk 3、開啟資料庫等待報錯 SQL> startup ORACLE instance started. Total System Global Area 422670336 bytes Fixed Size 1336960 bytes Variable Size 318769536 bytes Database Buffers 96468992 bytes Redo Buffers 6094848 bytes Database mounted. ORA-01157: cannot identify/lock data file 1
- see DBWR trace file ORA-01110: data file 1:
'/u01/app/oracle/oradata/oracle11g/system01.dbf' 4、登陸rman檢視報錯 [oracle@oel11g ~]$ rman target / Recovery Manager: Release 11.2.0.1.0 - Production
on Wed Sep 5 21:12:48 2012 Copyright (c) 1982, 2009, Oracle and/or its
affiliates. All rights reserved. connected to target database: ORACLE11
(DBID=2483499420, not open) 使用list failure檢視錯誤資訊 RMAN> list failure; using target database control file instead
of recovery catalog List of Database Failures ========================= Failure ID Priority Status Time Detected Summary ---------- -------- --------- -------------
------- 102
CRITICAL OPEN 05-SEP-12 System datafile 1: '/u01/app/oracle/oradata/oracle11g/system01.dbf'
is missing 5、可以進一步檢視更詳細的資訊 RMAN> list failure 102 detail; List of Database Failures ========================= Failure ID Priority Status Time Detected Summary ---------- -------- --------- -------------
------- 102
CRITICAL OPEN 05-SEP-12 System datafile 1:
'/u01/app/oracle/oradata/oracle11g/system01.dbf' is missing
Impact: Database cannot be opened 6、使用advise命令令系統給出錯誤的處理建議 RMAN> advise failure; List of Database Failures ========================= Failure ID Priority Status Time Detected Summary ---------- -------- --------- -------------
------- 102
CRITICAL OPEN 05-SEP-12 System datafile 1:
'/u01/app/oracle/oradata/oracle11g/system01.dbf' is missing
Impact: Database cannot be opened 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/oracle11g/system01.dbf
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/diag/rdbms/oracle11g/oracle11g/hm/reco_2411470321.hm 7、使用repair failure preview指令預覽修復情況且同時獲取恢復使用的指令 RMAN>
repair failure preview; Strategy: The repair includes complete
media recovery with no data loss Repair script.
/u01/app/diag/rdbms/oracle11g/oracle11g/hm/reco_2411470321.hm contents of repair script.: #
restore and recover datafile
restore datafile 1;
recover datafile 1; 8、使用repair failure恢復資料庫 中途會提示是否恢復錯誤,提示是否開啟資料庫,這裡選擇開啟 RMAN> repair failure; Strategy: The repair includes complete
media recovery with no data loss Repair script. /u01/app/diag/rdbms/oracle11g/oracle11g/hm/reco_2411470321.hm contents of repair script.: #
restore and recover datafile
restore datafile 1;
recover datafile 1; Do you really want to execute the above
repair (enter YES or NO)? Yes Starting restore at 05-SEP-12 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 /u01/app/oracle/oradata/oracle11g/system01.dbf channel ORA_DISK_1: reading from backup
piece
/u01/app/flash_recovery_area/ORACLE11G/backupset/2012_09_05/o1_mf_nnndf_TAG20120905T204753_84hwotbd_.bkp channel ORA_DISK_1: piece
handle=/u01/app/flash_recovery_area/ORACLE11G/backupset/2012_09_05/o1_mf_nnndf_TAG20120905T204753_84hwotbd_.bkp
tag=TAG20120905T204753 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete,
elapsed time: 00:02:28 Finished restore at 05-SEP-12 Starting recover at 05-SEP-12 using channel ORA_DISK_1 starting media recovery media recovery complete, elapsed time:
00:00:08 Finished recover at 05-SEP-12 repair failure complete Do you want to open the database (enter YES
or NO)? Yes database opened 9、資料庫恢復後進行檢視是否恢復成功 [oracle@oel11g ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on
Wed Sep 5 21:28:11 2012 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition
Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining
and Real Application Testing options SQL> select name from v$dbfile; NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/oracle11g/users01.dbf /u01/app/oracle/oradata/oracle11g/undotbs01.dbf /u01/app/oracle/oradata/oracle11g/sysaux01.dbf /u01/app/oracle/oradata/oracle11g/system01.dbf /u01/app/oracle/oradata/oracle11g/example01.dbf 只有答案B,C是資料丟失或損壞的選項,所以選擇B,C Thanks Onepiece 2012-09-22
相關文章
- 11gOCP精解 之 02Go
- 11gOCP精解 之 11Go
- 11gOCP精解 之 06Go
- 11gOCP精解 之 05Go
- 11gOCP精解 之 04Go
- 11gOCP精解 之 03Go
- 11gOCP精解 之 12Go
- 精典演算法之詳解 河內之塔演算法
- XML入門精解之結構與語法 (轉)XML
- XML入門精解之結構與語法(轉)XML
- 面試精選之Promise面試Promise
- Flutter動畫之粒子精講Flutter動畫
- 精讀《圖解HTTP》圖解HTTP
- Raft協議精解Raft協議
- 【精益生產】詳解精益物流改善方法
- 以太坊簡介(2019 精校精注版)
- 面試精選之http快取面試HTTP快取
- 【leetcode】每日精選題詳解之59. 螺旋矩陣 IILeetCode矩陣
- 分散式之 Redis 複習精講分散式Redis
- EMNLP 2019 丨微軟亞洲研究院精選論文解讀微軟
- 精選!CSS 動畫之工具、框架和教程CSS動畫框架
- Oracle 邏輯備份之EXPDP精講Oracle
- 爬蟲之xpath精準定位--位置定位爬蟲
- NeurlPS 2019丨微軟亞洲研究院精選論文解讀微軟
- ORA-01658 錯誤之解決方案
- 解讀 | 2019年10篇計算機視覺精選論文(上)計算機視覺
- PHP 函式庫精講之類與物件PHP函式物件
- 【說雲精選】後端之Laravel專刊後端Laravel
- Java認證 SCJP 之精闢總結 (轉)Java
- 專案成功之團隊精誠合作(轉)
- golang技術文章精選(2019)Golang
- centos5.4 的rpm命令精解CentOS
- 可愛精靈在球裡養著玩?《精靈之境》IOS預約開啟!iOS
- 01 前端HTTP協議(圖解HTTP) 之 網路基礎前端HTTP協議圖解
- 【精讀】自然語言處理基礎之RNN自然語言處理RNN
- 併發條件佇列之Condition 精講佇列
- 分散式之訊息佇列複習精講分散式佇列
- 2018春招前端面試: 闖關記(精排精校) | 掘金技術徵文前端面試