1、故障现象
应用无法连接数据库
检查数据库服务器器监听状态如下:
[oracle@crmdb ~]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 28-NOV-2019 14:29:51 Copyright (c) 1991, 2013, Oracle. All rights reserved. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production Start Date 28-NOV-2019 14:25:42 Uptime 0 days 0 hr. 4 min. 9 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Log File /oracle/diag/tnslsnr/crmdb/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=crmdb)(PORT=1521))) Services Summary... Service "crmdb" has 1 instance(s). Instance "crmdb", status BLOCKED, has 1 handler(s) for this service... The command completed successfully
重启数据库,报如下错误:
[oracle@crmdb ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Nov 28 14:31:03 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 immediate ORA-01507: database not mounted ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 1.0021E+10 bytes Fixed Size 2261848 bytes Variable Size 3791654056 bytes Database Buffers 6207569920 bytes Redo Buffers 19894272 bytes ORA-00214: control file '/oracle/fast_recovery_area/crmdb/control02.ctl' version 579351 inconsistent with file '/oradata/crmdb/control01.ctl' version 579331
control01.ctl和control02.ctl 的版本不一致错误。
2、故障恢复过程
1、修复控制文件
ORA-00214: control file '/oracle/fast_recovery_area/crmdb/control02.ctl' version 579351 inconsistent with file '/oradata/crmdb/control01.ctl' version 579331
从条信息可以看出control02.ctl的版本号高于control01.ctl,备份control01.ctl,用control02.ctl覆盖control01.ctl
[oracle@crmdb ~]$ mv /oradata/crmdb/control01.ctl /oradata/crmdb/control01.ctl_bak [oracle@crmdb ~]$ cp /oracle/fast_recovery_area/crmdb/control02.ctl /oradata/crmdb/control01.ctl
2、启动数据库
接着报如下错误
ORA-00742: Log read detects lost write in thread %d sequence %d block %d ORA-00312: online log 1 thread 1: '/oradata/crmdb/redo01.log'
尝试用以下命令恢复
recover database using backup controlfile until cancel;
具体过程点我