使用RMAN實現災難恢復測試
[@more@]
假設某天資料庫伺服器作業系統級故障,導致資料庫當機。
實現恢復步驟如下:在測試的資料庫test下建立一張表,並在表中新增幾條記錄,commit;然後alter system switch logfile;可以多執行幾次。
配置RMAN恢復目錄:
第一步,在目錄資料庫中建立恢復目錄所用表空間:
SQL> create tablespace rman_ts datafile 'd:oracleoradatarmanrman_ts.dbf' size 20M;
表空間已建立。
第二步,在目錄資料庫中建立RMAN 使用者並授權:
SQL> create user rman identified by rman default tablespace rman_ts temporary tablespace temp quota unlimited on rman_ts;
SQL> grant recovery_catalog_owner to rman ;
授權成功。
SQL> grant connect, resource to rman ;
授權成功。
第三步,在目錄資料庫中建立恢復目錄
C:>rman catalog rman/rman
恢復管理器:版本8.1.6.0.0 - Production
RMAN-06008:連線到恢復目錄資料庫
RMAN-06428:未安裝恢復目錄
RMAN>create catalog tablespace rman_ts;
RMAN-06431:恢復目錄已建立
第四步,註冊目標資料庫
c:>rman catalog target
RMAN> register database;
配置controlfile的自動備份
第五步,完全備份目標資料庫:
c:>rman catalog target
rman〉backup incremental level 0 maxsetsize 4g database;
rman〉sql 'alter system switch logfile';
刪除目標資料庫test;
重新建立目標資料庫test;
關閉目標資料庫 sql〉shutdown immediate;
載入目標資料庫sql〉startup nomount;
使用rman恢復目標資料庫,不完全恢復,重做日誌中的資料丟失。
c:>rman catalog target
rman〉restore spfile to 'c:oracleSPFILETEST.ora' from autobackup; --然後copy到spfile原來的路徑下
在目標資料庫上重建pwdtest.ora檔案
c:>orapwd file=C:oracleora92databasePWDtest.ora password=passwdsa entries=10;
重新啟動資料庫到mount狀態;
在rman資料庫上執行
c:>rman catalog target
rman〉restore controlfile to 'C:oracleoradatatestcontrol01.ctl' from autobackup;
rman〉restore controlfile to 'C:oracleoradatatestcontrol02.ctl' from autobackup;
rman〉restore controlfile to 'C:oracleoradatatestcontrol03.ctl' from autobackup;
rman〉restore database;
rman>recover database;
rman>alter database open resetlogs;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/73920/viewspace-916498/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle RMAN恢復測試Oracle
- RMAN備份與恢復測試
- IT系統災難恢復基本指南
- RMAN恢復實踐
- 透過搭建恢復目錄實現RMAN異地備份和恢復
- RMAN增量恢復
- RMAN恢復之RMAN-06555處理
- VMware Live Site Recovery 9.0 - 資料中心災難恢復 (DR)
- VMware Site Recovery Manager 9.0 - 資料中心災難恢復 (DR)
- VMware Live Site Recovery 9.0.1 - 資料中心災難恢復 (DR)
- 12 使用RMAN備份和恢復檔案
- rman 增量備份恢復
- RMAN備份恢復技巧
- SQLSERVER恢復測試SQLServer
- MySQL資料災難挽救之ibdata檔案誤刪恢復MySql
- 【資料庫資料恢復】ORACLE常見資料災難&資料恢復可能性資料庫資料恢復Oracle
- 案發現場:被注入的軟體及 ORA-600 16703 災難的恢復
- 查詢RMAN恢復進度
- Oracle RMAN 表空間恢復Oracle
- RMAN備份異機恢復
- 關於“災難恢復即服務”選型的十個提示
- 檢查Oracle災難恢復場景下的物理備庫XIOracle
- 雲化是託管備份和災難恢復的未來
- RMAN備份恢復典型案例——異機恢復未知DBID
- dg丟失歸檔,使用rman增量備份恢復
- Veeam助力TrendMicro解決資料保護和災難恢復挑戰
- oracle資料庫災難挽救應急方案之DML誤操作恢復Oracle資料庫
- RMAN備份恢復效能優化優化
- 在rman恢復中incarnation的概念
- 修改雲端計算災難恢復計劃,最佳實踐的7個建議來了!
- 《資訊保安技術 災難恢復能力評估準則》正式釋出
- oracle資料庫災難挽救應急方案之DDL誤操作恢復(drop)Oracle資料庫
- oracle資料庫災難挽救應急方案之DDL誤操作恢復(truncate)Oracle資料庫
- Oracle 備份恢復篇之RMAN catalogOracle
- ORACLE DG從庫 Rman備份恢復Oracle
- rman備份異機恢復(原創)
- RMAN備份恢復典型案例——RMAN備份&系統變慢
- 伺服器資料恢復-UNIX類檔案系統資料災難的資料恢復可能性分析伺服器資料恢復
- 12C PDB使用RMAN的4種完全恢復場景