![376fc03bf437e1623d81dd670b537a15.png](https://i-blog.csdnimg.cn/blog_migrate/09e1cfa65162aac722c8c091a90f4bef.jpeg)
前言:由于断电或者其他异常,导致数据库启动存在问题
(客户端连接时会提示ORA-12528, TNS:listener: all appropriate instances are blocking new connections)
1、检查数据库:--确认你的报错和笔者的情景一致
[oracle@oraclecent7402 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 13-MAY-2019 14:11:48
Copyright (c) 1991, 2013, 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.4.0 - Production
Start Date 09-MAY-2019 08:55:21
Uptime 4 days 5 hr. 16 min. 26 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/oraclecent7402/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.190.37.50)(PORT=1521)))
Services Summary...
……
Service "ywsrmtest" has 1 instance(s).
Instance "ywsrmtest", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
[oracle@oraclecent7402 admin]$ export ORACLE_SID=ywsrmtest
[oracle@oraclecent7402 admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon May 13 14:18:56 2019
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
SQL> shutdown abort
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 1.1324E+10 bytes
Fixed Size 2263416 bytes
Variable Size 2113930888 bytes
Database Buffers 9193914368 bytes
Redo Buffers 14053376 bytes
SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-00214: control file '/u01/app/oracle/oradata/ywsrmtest/control01.ctl'
version 18992 inconsistent with file
'/u01/app/oracle/fast_recovery_area/ywsrmtest/control02.ctl' version 18988
2、开始解决:
SQL> create pfile='/u01/app/oracle/oradata/ywsrmtest/init.ora' from spfile;
File created.
前往以上文件路径,编辑ora文件,删除control02.ctl
[oracle@oraclecent7402 ywsrmtest]$ vi init.ora
ywsrmtest.__db_cache_size=9462349824
ywsrmtest.__java_pool_size=134217728
ywsrmtest.__large_pool_size=167772160
ywsrmtest.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
ywsrmtest.__pga_aggregate_target=3791650816
ywsrmtest.__sga_target=11374952448
ywsrmtest.__shared_io_pool_size=0
ywsrmtest.__shared_pool_size=1543503872
ywsrmtest.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/ywsrmtest/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.control_files='/u01/app/oracle/oradata/ywsrmtest/control01.ctl'---删除掉02.ctl
……
SQL> shutdow abort
ORACLE instance shut down.
SQL> create spfile from pfile='/u01/app/oracle/oradata/ywsrmtest/init.ora';
File created.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 1.1324E+10 bytes
Fixed Size 2263416 bytes
Variable Size 2113930888 bytes
Database Buffers 9193914368 bytes
Redo Buffers 14053376 bytes
SQL>
SQL> alter database mount;
Database altered.----这一次数据库挂载成功咯~
SQL> exit
[oracle@oraclecent7402 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 13-MAY-2019 14:47:23
Copyright (c) 1991, 2013, 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.4.0 - Production
Start Date 09-MAY-2019 08:55:21
Uptime 4 days 5 hr. 52 min. 1 sec
Trace Level off
curity ON: Local OS Authentication
▽NMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/oraclecent7402/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.190.37.50)(PORT=1521)))
Services Summary...
……
Service "ywsrmtest" has 1 instance(s).
Instance "ywsrmtest", status READY, has 1 handler(s) for this service...
至此,问题解决。