Oracle启动报错:ORA-00214 控制文件版本不一致恢复过程

发布时间 2023-03-31 15:29:02作者: Realife

1、报出的错误:

SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-00214: control file '/home/oracle/app/oracle/oradata/helowin/control01.ctl'
version 851 inconsistent with file
'/home/oracle/app/oracle/flash_recovery_area/helowin/control02.ctl' version 841

2、开始解决:

SQL> create spfile from pfile='/home/oracle/app/oracle/oradata/helowin/init.ora';

File created.

前往以上文件路径,编辑ora文件,删除control02.ctl

[oracle@99e1409723d8 ~]$ vi /home/oracle/app/oracle/oradata/helowin/init.ora

helowin.__db_cache_size=1191182336
helowin.__java_pool_size=16777216
helowin.__large_pool_size=16777216
helowin.__oracle_base='/home/oracle/app/oracle'#ORACLE_BASE set from environment
helowin.__pga_aggregate_target=1744830464
helowin.__sga_target=1610612736
helowin.__shared_io_pool_size=0
helowin.__shared_pool_size=369098752
helowin.__streams_pool_size=0
*.audit_file_dest='/home/oracle/app/oracle/admin/helowin/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/home/oracle/app/oracle/oradata/helowin/control01.ctl'---删除掉02.ctl
*.db_block_size=8192
*.db_domain=''
*.db_name='helowin'
*.db_recovery_file_dest='/home/oracle/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=4070572032
*.diagnostic_dest='/home/oracle/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=helowinXDB)'
*.local_listener='LISTENER_HELOWIN'
*.open_cursors=300
*.pga_aggregate_target=1741684736
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=1610612736
*.undo_tablespace='UNDOTBS1'

重新连接oracle

[oracle@99e1409723d8 ~]$ sqlplus /nolog
SQL> conn /as sysdba
SQL> shutdow abort
ORACLE instance shut down.
SQL> create spfile from pfile='/home/oracle/app/oracle/oradata/helowin/init.ora';

File created.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 1603411968 bytes
Fixed Size                  2213776 bytes
Variable Size             402655344 bytes
Database Buffers         1191182336 bytes
Redo Buffers                7360512 bytes
SQL> alter database mount;

Database altered.--这一次数据库挂载成功

SQL> alter database open;

Database altered.
SQL> exit

3、问题解决

[oracle@99e1409723d8 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 31-MAR-2023 15:18:11

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                31-MAR-2023 14:23:39
Uptime                    0 days 0 hr. 54 min. 31 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora
Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/99e1409723d8/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=99e1409723d8)(PORT=1521)))
Services Summary...
Service "helowin" has 1 instance(s).
  Instance "helowin", status READY, has 1 handler(s) for this service...
Service "helowinXDB" has 1 instance(s).
  Instance "helowin", status READY, has 1 handler(s) for this service...
The command completed successfully