Oracle控制文件出错导致启动不到mount状态

来源:互联网 发布:外卖网络市场调研报告 编辑:程序博客网 时间:2024/06/06 09:52
SQL> startup nomount;
ORACLE instance started.


Total System Global Area  217157632 bytes
Fixed Size    2251816 bytes
Variable Size  159384536 bytes
Database Buffers   50331648 bytes
Redo Buffers    5189632 bytes
SQL> start
SP2-1506: START, @ or @@ command has no arguments
SQL> 
SQL> alter database mount;
alter database mount
*
ERROR at line 1:

ORA-00205: error in identifying control file, check alert log for more info


Oracle可以启动到nomount状态,但是启动不到mount状态,通过上面提示可以确定在启动到mount状态的时候,控制文件出错了。这样可能是参数文件里面控制文件的路径出现了错误。


 db_name=ordb
control_files='/u01/app/oracle/oradata/oradb/control01.ctl','/u01/app/oracle/oradata/oradb/control02.ctl' 
参数文件里的内容。

实际控制文件所在路径

 [oracle@oracle11g oradata]$ cd oradb/
[oracle@oracle11g oradb]$ ls
ctl01.ctl  ctl02.ctl  redo01.log  redo02.log  redo03.log  sysaux01.dbf  system01.dbf  temp01.dbf  undotbs01.dbf

可以看到参数文件里面控制的路径和实际控制文件路不一样。通过修改参数文件之后。


SQL> create spfile from pfile='/home/oracle/initoradb.txt';
create spfile from pfile='/home/oracle/initoradb.txt'
*
ERROR at line 1:
ORA-32002: cannot create SPFILE already being used by the instance

可以看到当前实例正在使用之前错误的参数文件,先将实例关闭了。

SQL> shutdown immediate;
ORA-01507: database not mounted




ORACLE instance shut down.
SQL> create spfile from pfile='/home/oracle/initoradb.txt';


File created.

SQL> startup nomount;
ORACLE instance started.


Total System Global Area  217157632 bytes
Fixed Size    2251816 bytes
Variable Size  159384536 bytes
Database Buffers   50331648 bytes
Redo Buffers    5189632 bytes


SQL> alter database mount;


Database altered.


SQL> alter database open;


Database altered.

上面错误中可以看到实例启动的过程当中是先去读取参数文件,如果参数文件中控制文件的路径出现问题会导致无法启动到mount状态。






原创粉丝点击