RMAN恢復 執行重要檔案RMAN恢復
如果丟失資料檔案在system和undo表空間,就視為重要資料檔案,必須停掉資料庫進行恢復
步驟:
1、如果資料庫仍處於開啟狀態,shutdown abort
2、startup mount
3、restore
4、recover
5、open
模擬刪除sysaux.dbf
mv /home/oracle/app/oracle/oradata/sap/sysaux01.dbf /home/oracle/app/oracle/oradata/sap/sysaux01.dbf_del
測試資料庫暫時仍可用
使用shutdown immediate仍可以
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
啟動報錯
SQL> startup
ORACLE instance started.
Total System Global Area 830930944 bytes
Fixed Size 2217912 bytes
Variable Size 503318600 bytes
Database Buffers 318767104 bytes
Redo Buffers 6627328 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2: '/home/oracle/app/oracle/oradata/sap/sysaux01.dbf'
RMAN> list failure
2> ;
List of Database Failures
=========================
Failure ID Priority Status Time Detected Summary
---------- -------- --------- ------------- -------
1062 HIGH OPEN 03-MAR-14 One or more non-system datafiles are missing
1088 HIGH OPEN 03-MAR-14 Tablespace 4: 'USERS' is offline
RMAN> restore tablespace sysaux;
Starting restore at 03-MAR-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=129 device type=DISK
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 00002 to /home/oracle/app/oracle/oradata/sap/sysaux01.dbf
channel ORA_DISK_1: reading from backup piece /rman_bak/1dp27q4q_1_1
channel ORA_DISK_1: piece handle=/rman_bak/1dp27q4q_1_1 tag=LZTESTARCH
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 03-MAR-14
RMAN> recover tablespace sysaux;
Starting recover at 03-MAR-14
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 12 is already on disk as file /home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_12_9k94tm0c_.arc
archived log for thread 1 with sequence 13 is already on disk as file /home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_13_9kbhlkwh_.arc
archived log for thread 1 with sequence 14 is already on disk as file /home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_14_9kbhm25o_.arc
archived log for thread 1 with sequence 15 is already on disk as file /home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_15_9kbhmfx5_.arc
archived log for thread 1 with sequence 16 is already on disk as file /home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_16_9kbhmsw5_.arc
archived log for thread 1 with sequence 17 is already on disk as file /home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_17_9kbhn87m_.arc
archived log for thread 1 with sequence 18 is already on disk as file /home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_18_9kbhtkfl_.arc
archived log for thread 1 with sequence 19 is already on disk as file /home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_19_9kbhvogj_.arc
archived log for thread 1 with sequence 20 is already on disk as file /home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_20_9kbhwctk_.arc
archived log for thread 1 with sequence 21 is already on disk as file /home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_21_9kbhxcrg_.arc
archived log for thread 1 with sequence 22 is already on disk as file /home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_22_9kbhy5nw_.arc
archived log file name=/home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_12_9k94tm0c_.arc thread=1 sequence=12
archived log file name=/home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_13_9kbhlkwh_.arc thread=1 sequence=13
archived log file name=/home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_14_9kbhm25o_.arc thread=1 sequence=14
archived log file name=/home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_15_9kbhmfx5_.arc thread=1 sequence=15
archived log file name=/home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_16_9kbhmsw5_.arc thread=1 sequence=16
archived log file name=/home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_17_9kbhn87m_.arc thread=1 sequence=17
archived log file name=/home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_18_9kbhtkfl_.arc thread=1 sequence=18
archived log file name=/home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_19_9kbhvogj_.arc thread=1 sequence=19
archived log file name=/home/oracle/app/oracle/flash_recovery_area/SAP/archivelog/2014_03_03/o1_mf_1_20_9kbhwctk_.arc thread=1 sequence=20
media recovery complete, elapsed time: 00:00:09
Finished recover at 03-MAR-14
SQL> alter database open;
Database altered.
恢復 完成
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8494287/viewspace-1349474/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RMAN增量恢復
- 12 使用RMAN備份和恢復檔案
- RMAN恢復實踐
- RMAN恢復之RMAN-06555處理
- rman 增量備份恢復
- Oracle RMAN恢復測試Oracle
- RMAN備份恢復技巧
- rman恢復控制檔案的一個小錯誤
- 查詢RMAN恢復進度
- Oracle RMAN 表空間恢復Oracle
- RMAN備份異機恢復
- RMAN備份恢復典型案例——異機恢復未知DBID
- 【RMAN】如果控制檔案損壞那麼如何恢復?恢復控制檔案的方式有哪幾種?
- RMAN備份恢復效能優化優化
- 在rman恢復中incarnation的概念
- RMAN備份與恢復測試
- RMAN備份恢復典型案例——資料檔案存在壞快
- dg丟失歸檔,使用rman增量備份恢復
- Oracle 備份恢復篇之RMAN catalogOracle
- ORACLE DG從庫 Rman備份恢復Oracle
- rman備份異機恢復(原創)
- RMAN備份恢復典型案例——RMAN備份&系統變慢
- 【RMAN】Oracle12c以後rman 備份恢復命令參考Oracle
- 【RMAN】在多租戶環境下的RMAN備份及恢復
- Oracle 12C新特性-RMAN恢復表Oracle
- RMAN備份恢復典型案例——ORA-00245
- 透過搭建恢復目錄實現RMAN異地備份和恢復
- [20190718]12c rman新特性 表恢復.txt
- 備份恢復Lesson 04.Using the RMAN Recovery Catalog
- RMAN深入解析之--Incarnation應用(不完全恢復)
- 透過RMAN備份standby database成功恢復還原Database
- oracle ORA-01180 ORA-01110(rman恢復問題)Oracle
- ORACLE 11.2.0.4 RAC RMAN異機恢復之ORA-15001Oracle
- RMAN備份恢復典型案例——資料庫卡頓資料庫
- NBU恢復Oracle通道完成後RMAN沒有進度Oracle
- Oracle9i RMAN 的優缺點及RMAN 備份及恢復步驟Oracle
- 同名檔案替換怎麼恢復,恢復同名檔案
- 一次rman恢復引起的nologging問題模擬
- RMAN備份恢復典型案例——跨平臺遷移pdb