oracle00205报错,[Oracle] 数据库启动失败报错 ORA-00205: error in identifying control file

当遇到Oracle数据库启动报错ORA-00205时,可能是控制文件问题。检查控制文件路径,确认其存在且未被其他进程占用。通过创建pfile并修改控制文件配置,尝试启动数据库。如果仍有问题,检查rc.local中的开机启动设置,并解决进程占用。最终,成功启动数据库并创建spfile,确保后续能用spfile正常启动。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

有同事问我,他的数据库启动失败,报错如下:

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

这种报错,立刻可以想到的是,控制文件损坏,或者控制文件不存在

我查看了控制文件是存在的,但是控制文件的路径有点奇怪,一个在

/home/oracle/product/oradata/orcl/control01.ctl

另外一个在闪回目录下

于是我创建了一个pfile /home/oracle/zhu.ora

然后修改了里/home/oracle/zhu.ora关于控制文件的指定,只指定一个控制文件,如下

*.control_files='/home/oracle/product/oradata/orcl/control01.ctl'

再尝试启动数据库

SQL>startup pfile='/home/oracle/zhu.ora'

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

此时我查看了alert文件,发现如下报错信息

ORA-00210: cannot open the specified control file

ORA-00202: control file: '/home/oracle/product/oradata/orcl/control01.ctl'

ORA-27086: unable to lock file - already in use

这个表示控制文件已经被人打开了,我没法再次打开了。

于是 ps -ef | grep oracle 发现很多oracle的进程

oracle    2233     1  0 21:03 ?        00:00:00 ora_pmon_ora11g

oracle    2235     1  0 21:03 ?        00:00:00 ora_psp0_ora11g

oracle    2237     1  0 21:03 ?        00:00:00 ora_vktm_ora11g

oracle    2241     1  0 21:03 ?        00:00:00 ora_gen0_ora11g

oracle    2243     1  0 21:03 ?        00:00:00 ora_diag_ora11g

oracle    2245     1  0 21:03 ?        00:00:00 ora_dbrm_ora11g

oracle    2247     1  0 21:03 ?        00:00:00 ora_dia0_ora11g

oracle    2249     1  0 21:03 ?        00:00:00 ora_mman_ora11g

oracle    2251     1  1 21:03 ?        00:00:01 ora_dbw0_ora11g

这时我怀疑可能是rc.local设置了开机自动

果然

[oracle@V-02-01-00410 etc]$ more /etc/rc.local

#!/bin/sh

#

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

su - oracle -c 'dbstart'

su - oracle -c 'lsnrctl start'

于是我将rc.loca里的开机自动启动oracle的功能注释掉了

然后reboot

好了,我这个时候再用zhu.ora启动数据库就OK了

SQL> startup pfile='/home/oracle/zhu.ora'

ORACLE instance started.

Total System Global Area 1603411968 bytes

Fixed Size                  2253664 bytes

Variable Size            1006636192 bytes

Database Buffers          587202560 bytes

Redo Buffers                7319552 bytes

Database mounted.

Database opened.

然后我再次关闭数据库,做了如下操作

到/home/oracle/product/oradata/orcl/目录下复制两份控制文件

cp control01.ctl control02.ctl

cp control01.ctl control03.ctl

修改/home/oracle/zhu.ora里面控制文件的说明,增加两个控制文件

*.control_files='/home/oracle/product/oradata/orcl/control01.ctl','/home/oracle/product/oradata/orcl/control02.ctl','/home/oracle/product/oradata/orcl/control03.ctl'

SQL> conn /as sysdba

Connected to an idle instance.

SQL> startup pfile='/home/oracle/zhu.ora'

ORACLE instance started.

Total System Global Area 1603411968 bytes

Fixed Size                  2253664 bytes

Variable Size            1006636192 bytes

Database Buffers          587202560 bytes

Redo Buffers                7319552 bytes

Database mounted.

Database opened.

SQL> create spfile from pfile='/home/oracle/zhu.ora';

File created.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area 1603411968 bytes

Fixed Size                  2253664 bytes

Variable Size            1006636192 bytes

Database Buffers          587202560 bytes

Redo Buffers                7319552 bytes

Database mounted.

Database opened.

此时数据库已经能用spfile正常启动了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值