001 关闭数据库
-
SYS@ORCL> shutdown immediate
-
Database closed.
-
Database dismounted.
-
ORACLE instance shut down.
-
SYS@ORCL> quit
-
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
-
With the Partitioning, OLAP, Data Mining and Real Application Testing options
002 在操作系统级别删除一个控制文件
-
[oracle@hhu ~] rm /u01/app/oracle/oradata/ORCL/control01.ctl
003 尝试打开数据库,报错
-
[oracle@hhu ~]$ sqlplus / as sysdba
-
-
SQL*Plus: Release 11.2.0.4.0 Production on Fri Mar 11 09:55:29 2016
-
-
Copyright (c) 1982, 2013, Oracle. All rights reserved.
-
-
Connected to an idle instance.
-
-
SYS@ORCL> startup mount
-
ORACLE instance started.
-
-
Total System Global Area 1653518336 bytes
-
Fixed Size 2253784 bytes
-
Variable Size 1006636072 bytes
-
Database Buffers 637534208 bytes
-
Redo Buffers 7094272 bytes
-
ORA-00205: error in identifying control file, check alert log for more info
004 根据提示进入alert.log查看被删除的控制文件名及其具体路径(假定事先不知道被删除的控制文件具体路径及控制文件名)
-
[oracle@hhu ~]$ cd /u01/app/oracle/diag/rdbms/orcl/ORCL/trace
-
[oracle@hhu trace]$ cat alert_ORCL.log
-
ALTER DATABASE MOUNT
-
ORA-00210: cannot open the specified control file
-
ORA-00202: control file: '/u01/app/oracle/oradata/ORCL/control01.ctl'
-
ORA-27037: unable to obtain file status
-
Linux-x86_64 Error: 2: No such file or directory
-
Additional information: 3
-
ORA-205 signalled during: ALTER DATABASE MOUNT...
005 关闭数据库,将完整的控制文件复制到alert.log提示的位置
-
SYS@ORCL> shutdown abort
-
ORACLE instance shut down.
-
[oracle@hhu ORCL]$ cp /u01/app/oracle/fast_recovery_area/ORCL/control02.ctl /u01/app/oracle/oradata/ORCL/control01.ctl
006 将数据库启动到mount状态,再将其open
-
SYS@ORCL> startup mount
-
ORACLE instance started.
-
-
Total System Global Area 1653518336 bytes
-
Fixed Size 2253784 bytes
-
Variable Size 1006636072 bytes
-
Database Buffers 637534208 bytes
-
Redo Buffers 7094272 bytes
-
Database mounted.
-
SYS@ORCL> alter database open;
-
-
Database altered.
恢复成功。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29067253/viewspace-2055490/
,如需转载,请注明出处,否则将追究法律责任。