【實驗】從RMAN備份中恢復controlfile控制檔案

secooler發表於2009-03-13
1.資料庫open狀態,有自動備份的資訊,恢復控制檔案
RMAN> restore controlfile to '/home/oracle/control01.ctl' from autobackup;

Starting restore at 14-MAR-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=544 devtype=DISK

recovery area destination: /oracle/u01/app/oracle/flash_recovery_area
database name (or database unique name) used for search: ORA10G
channel ORA_DISK_1: autobackup found in the recovery area
channel ORA_DISK_1: autobackup found: /oracle/u01/app/oracle/flash_recovery_area/ORA10G/autobackup/2009_03_14/o1_mf_s_681463726_4vov1jf8_.bkp
channel ORA_DISK_1: control file restore from autobackup complete
Finished restore at 14-MAR-09

RMAN> exit


Recovery Manager complete.
ora10g@linux5 /home/oracle$ ls -l control*
-rw-r----- 1 oracle oinstall 7061504 Mar 14 08:10 control01.ctl

2.無法mount,在nomount狀態下知道備份檔案的名稱,恢復控制檔案
RMAN> restore controlfile to '/home/oracle/control01.ctl' from '/oracle/u01/app/oracle/flash_recovery_area/ORA10G/autobackup/2009_03_14/o1_mf_s_681463726_4vov1jf8_.bkp';

Starting restore at 14-MAR-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=526 devtype=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
Finished restore at 14-MAR-09
注:此種情況在10g中亦可以透過自動備份的資訊進行恢復(from autobackup),在9i環境下透過自動備份的資訊進行恢復會報錯,只能使用這種方法進行恢復

secooler
09.03.13

-- The End --

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-567211/,如需轉載,請註明出處,否則將追究法律責任。

相關文章