Backup And Recovery User's Guide-從RMAN開始-恢復整個資料庫
使用RESTORE DATABASE和RECOVER DATABASE來還原整個資料庫。
之前必須對所有需要的檔案做過備份。
這裡假設可以還原所有的資料檔案到原來的位置,如果原來的位置不可訪問,則要使用SET NEWNAME命令。
練習:恢復整個資料庫
# 1. 準備恢復(上一練習) # 2. 使資料庫處於MOUNT狀態 sys@TESTDB12>shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. sys@TESTDB12>startup mount; ORACLE instance started.
Total System Global Area 839282688 bytes Fixed Size 2233000 bytes Variable Size 532680024 bytes Database Buffers 301989888 bytes Redo Buffers 2379776 bytes Database mounted. # 3. 還原資料庫 oracle@Redhat55.cuug.net:/home/oracle> rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Fri Jul 12 05:35:30 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: TESTDB12 (DBID=2811829300, not open)
RMAN> restore database;
Starting restore at 12-JUL-13 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=20 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 00001 to /u01/app/oracle/oradata/TestDB12/system01.dbf channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/TestDB12/sysaux01.dbf channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/TestDB12/undotbs01.dbf channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/TestDB12/users01.dbf channel ORA_DISK_1: restoring datafile 00005 to /u01/app/oracle/oradata/TestDB12/example01.dbf channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/TESTDB12/backupset/2013_07_12/o1_mf_nnndf_TAG20130712T053213_8xzm8xhf_.bkp channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/TESTDB12/backupset/2013_07_12/o1_mf_nnndf_TAG20130712T053213_8xzm8xhf_.bkp tag=TAG20130712T053213 channel ORA_DISK_1: restored backup piece 1 channel ORA_DISK_1: restore complete, elapsed time: 00:01:05 Finished restore at 12-JUL-13 # 4. 恢復資料庫 RMAN> recover database;
Starting recover at 12-JUL-13 using channel ORA_DISK_1
starting media recovery media recovery complete, elapsed time: 00:00:01
Finished recover at 12-JUL-13 # 5. 開啟資料庫 sys@TESTDB12>alter database open;
Database altered. |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/196700/viewspace-1474374/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Backup And Recovery User's Guide-從RMAN開始-恢復單個的資料塊GUIIDE
- Backup And Recovery User's Guide-從RMAN開始-恢復表空間GUIIDE
- Backup And Recovery User's Guide-從RMAN開始-還原和恢復資料庫檔案GUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-備份資料庫GUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-開始使用RMAN並連線到資料庫GUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-備份資料庫-增量備份GUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-使用閃回資料庫來回退資料庫GUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-使用資料恢復指導診斷和修復錯誤GUIIDE資料恢復
- Backup And Recovery User's Guide-從RMAN開始-指令碼化RMAN操作GUIIDE指令碼
- Backup And Recovery User's Guide-從RMAN開始-概覽RMAN環境GUIIDE
- Backup And Recovery User's Guide-執行完全資料庫恢復-執行整個資料庫的完全恢復GUIIDE資料庫
- Backup And Recovery User's Guide-執行完全資料庫恢復GUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-驗證資料庫檔案和備份GUIIDE資料庫
- Backup And Recovery User's Guide-恢復資料庫到祖先incarnationGUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-顯示預設的RMAN配置GUIIDE
- Backup And Recovery User's Guide-從RMAN開始-練習:對資料庫進行增量備份GUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-備份資料庫-典型的備份選項GUIIDE資料庫
- Backup And Recovery User's Guide-為完全資料庫恢復做準備GUIIDE資料庫
- Backup And Recovery User's Guide-執行不完全資料庫恢復GUIIDE資料庫
- Backup And Recovery User's Guide-執行資料庫時間點恢復GUIIDE資料庫
- Backup And Recovery User's Guide-執行完全資料庫恢復-關於完全資料庫恢復GUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-RMAN操作報表-資料庫檔案和備份報告GUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-備份處於非歸檔模式的資料庫GUIIDE模式資料庫
- Backup And Recovery User's Guide-執行完全資料庫恢復-執行開啟的資料庫的恢復GUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-備份資料庫-備份處於歸檔模式的資料庫GUIIDE資料庫模式
- Backup And Recovery User's Guide-從RMAN開始-RMAN操作報表-列表顯示備份GUIIDE
- Backup And Recovery User's Guide-RMAN資料修復概念-RMAN介質恢復GUIIDE
- Backup And Recovery User's Guide-恢復處於非歸檔模式的資料庫GUIIDE模式資料庫
- Backup And Recovery User's Guide-執行完全資料庫恢復-執行關閉的資料庫的恢復GUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-維護RMAN備份-cross-checking備份GUIIDEROS
- Backup And Recovery User's Guide-執行完全資料庫恢復-切換到資料庫拷貝GUIIDE資料庫
- Backup And Recovery User's Guide-閃回和資料庫時間點恢復場景GUIIDE資料庫
- Backup And Recovery User's Guide-閃回和資料庫時間點恢復的目的GUIIDE資料庫
- Backup And Recovery User's Guide-恢復的取消(並行介質恢復)GUIIDE並行
- Backup And Recovery User's Guide-執行完全資料庫恢復-執行表空間的完全恢復GUIIDE資料庫
- Backup And Recovery User's Guide-備份資料庫-使用RMAN備份資料庫檔案GUIIDE資料庫
- Backup And Recovery User's Guide-從RMAN開始-維護RMAN備份-刪除過期的備份GUIIDE
- Backup And Recovery User's Guide-執行RMAN表空間時間點恢復(TSPIRT)GUIIDE