1. 程式人生 > >數據庫備份恢復--恢復控制文件

數據庫備份恢復--恢復控制文件

archive set nis sch alter 控制文件 glob cross obsolete

現象:

1.數據庫無法mount

SYS@ocp> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info

前提:

1.控制文件自動備份

2.使用FRA

恢復步驟

1.啟動數據庫到nomount

SYS@ocp> startup nomount
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance


ORACLE instance started.

Total System Global Area 1603411968 bytes
Fixed Size 2253664 bytes
Variable Size 1409289376 bytes
Database Buffers 184549376 bytes
Redo Buffers 7319552 bytes

2.從自動備份中恢復控制文件

RMAN> restore controlfile from ‘/u01/app/oracle/product/11.2.0/db_1/dbs/c-2866727024-20180910-04‘;

Starting restore at 10-SEP-18


allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=921 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/oradata/OCP/controlfile/o1_mf_fb8w60b0_.ctl
output file name=/u01/app/oracle/fast_recovery_area/OCP/controlfile/o1_mf_fb8w60n4_.ctl


Finished restore at 10-SEP-18

3.mount數據庫

RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

4.recover數據

RMAN> recover database;

Starting recover at 10-SEP-18
Starting implicit crosscheck backup at 10-SEP-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=921 device type=DISK
Crosschecked 9 objects
Finished implicit crosscheck backup at 10-SEP-18

Starting implicit crosscheck copy at 10-SEP-18
using channel ORA_DISK_1
Finished implicit crosscheck copy at 10-SEP-18

searching for all files in the recovery area
cataloging files...
no files cataloged

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 1 is already on disk as file /u01/app/oracle/fast_recovery_area/OCP/onlinelog/o1_mf_1_fb8w649k_.log
archived log file name=/u01/app/oracle/fast_recovery_area/OCP/onlinelog/o1_mf_1_fb8w649k_.log thread=1 sequence=1
media recovery complete, elapsed time: 00:00:01
Finished recover at 10-SEP-18

5.restlogs打開數據庫

RMAN> alter database open resetlogs;

database opened

數據庫備份恢復--恢復控制文件