首页 > 数据库技术 > 详细

数据库备份恢复--恢复控制文件

时间:2018-09-10 22:14:31      阅读:257      评论:0      收藏:0      [点我收藏+]

 

 

现象:

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

 

数据库备份恢复--恢复控制文件

原文:https://www.cnblogs.com/bondait/p/9623405.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!