1.删除3号控制文件,模拟故障
[oracle@host01 PROD1]$ rm control03.ctl
2.登录数据库,创建表空间成功
SYS@PROD1>create tablespace ts_control datafile '/u01/app/oracle/oradata/PROD1/ts_control01.dbf' size 10m;
Tablespace created.
查看告警日志提示找不到3号控制文件
Errors in file /u01/app/oracle/diag/rdbms/prod1/PROD1/trace/PROD1_m000_6894.trc:
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/PROD1/control03.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
3.退出sqlplus,还可以正常登录
SYS@PROD1>exit
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
[oracle@host01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Dec 15 23:21:10 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
此时恢复控制文件,需要关闭数据库,关闭时提示找不到3号控制文件了,
shutdown immedaite失败,采用abort方式关闭
SYS@PROD1>shutdown immediate;
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/PROD1/control03.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SYS@PROD1>shutdown abort;
ORACLE instance shut down.
4.根据错误提示,拷贝1号控制文件为3号控制文件
[oracle@host01 PROD1]$ cp control01.ctl control03.ctl
5.成功打开数据库
SYS@PROD1>startup;
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 520096848 bytes
Database Buffers 310378496 bytes
Redo Buffers 2371584 bytes
Database mounted.
Database opened.
总结:丢失一个控制文件容易解决,控制文件互为镜像,通过实验,我们知道控制文件的重要性(控制文件可以称为数据库大脑)
一定要避免出现单点故障。
[oracle@host01 PROD1]$ rm control03.ctl
2.登录数据库,创建表空间成功
SYS@PROD1>create tablespace ts_control datafile '/u01/app/oracle/oradata/PROD1/ts_control01.dbf' size 10m;
Tablespace created.
查看告警日志提示找不到3号控制文件
Errors in file /u01/app/oracle/diag/rdbms/prod1/PROD1/trace/PROD1_m000_6894.trc:
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/PROD1/control03.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
3.退出sqlplus,还可以正常登录
SYS@PROD1>exit
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
[oracle@host01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Dec 15 23:21:10 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
此时恢复控制文件,需要关闭数据库,关闭时提示找不到3号控制文件了,
shutdown immedaite失败,采用abort方式关闭
SYS@PROD1>shutdown immediate;
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/PROD1/control03.ctl'
ORA-27041: unable to open file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
SYS@PROD1>shutdown abort;
ORACLE instance shut down.
4.根据错误提示,拷贝1号控制文件为3号控制文件
[oracle@host01 PROD1]$ cp control01.ctl control03.ctl
5.成功打开数据库
SYS@PROD1>startup;
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 520096848 bytes
Database Buffers 310378496 bytes
Redo Buffers 2371584 bytes
Database mounted.
Database opened.
总结:丢失一个控制文件容易解决,控制文件互为镜像,通过实验,我们知道控制文件的重要性(控制文件可以称为数据库大脑)
一定要避免出现单点故障。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31400681/viewspace-2130740/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/31400681/viewspace-2130740/