解决ORA-03113: 通信通道的文件结尾(实质是Control filesequence number mismatch)

Oracle 11g ORA-03113故障,重建控制文件


Windows环境下的Oracle 11g在一次关机后,无法正常启动,且无法启动到mount状态,一直提示:

ORA-03113: end-of-file on communication channel
Process ID: 4276
Session ID: 1286Serial number: 2
在D:\app\Administrator\diag\rdbms\wind\wind\trace目录里 根据Process ID: 4276找到相应号码的trc文件查看(实例名_ora_XXXXX.trc都是前台服务器进程的trace文件),发现如下提示:
Error:kccpb_sanity_check_2
Control filesequence number mismatch!
fhcsq: 168754bhcsq: 168757 cfn 0
所以确认为控制文件问题引起。

首先退出了SQLPLUS,然后把库文件所在的整个目录备份了一份。
然后尝试restore控制文件:
         C:\> rman target/
         RMAN> shutdownimmediate
         RMAN> startupnomount
         RMAN> restorecontrolfile from ‘D:\ptc\Windchill_10.0\ocu\oradata\wind\CONTROL03_WIND.CTL’;
完成以上操作后,重新进入SQLPLUS,启动数据库时问题依旧。
可以确认所有控制文件全部出了问题,因库文件等都存在,所以决定重建控制文件:
C:\> sqlplus /nolog
SQL> conn / as sysdba
SQL> shutdown immediate
SQL> startup nomount

SQL> CREATE CONTROLFILE REUSE DATABASE "WIND"NORESETLOGS NOARCHIVELOG
            MAXLOGFILES 16
            MAXDATAFILES 100
            MAXINSTANCES 2
            MAXLOGHISTORY 453
            LOGFILE
            GROUP 1'D:\ptc\Windchill_10.0\ocu\oradata\wind\WINDREDO01.LOG' SIZE 50M,
            GROUP 2'D:\ptc\Windchill_10.0\ocu\oradata\wind\WINDREDO02.LOG' SIZE 50M,
            GROUP 3'D:\ptc\Windchill_10.0\ocu\oradata\wind\WINDREDO03.LOG' SIZE 50M
            DATAFILE
            'D:\ptc\Windchill_10.0\ocu\oradata\wind\WINDBLOBS01.DBF',
            'D:\ptc\Windchill_10.0\ocu\oradata\wind\WINDINDEX01.DBF',
            'D:\ptc\Windchill_10.0\ocu\oradata\wind\WINDSYSAUX01.DBF',
            'D:\ptc\Windchill_10.0\ocu\oradata\wind\WINDSYSTEM01.DBF',
            'D:\ptc\Windchill_10.0\ocu\oradata\wind\WINDUNDOTBS01.DBF',
            'D:\ptc\Windchill_10.0\ocu\oradata\wind\WINDUSERS01.DBF',
            'D:\ptc\Windchill_10.0\ocu\oradata\wind\WINDWCAUDIT01.DBF'
            CHARACTER SET ZHS16GBK;
SQL> RECOVER DATABASE;
SQL> alter database open;
SQL> alter tablespace temp
            add tmpfile'D:\ptc\Windchill_10.0\ocu\oradata\wind\WINDTEMP01.DBF'
            SIZE 200M REUSE AUTOEXTEND ON MAXSIZE 5G;
完成以上步骤后,重启数据库正常。

==========================================================================
CREATE CONTROLFILE REUSE DATABASE "PARSEDB2"NORESETLOGS NOARCHIVELOG
MAXINSTANCES 8
MAXLOGHISTORY 1
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
Datafile
'F:\Program\Oracle\oradata\PARSEDB2\SYSTEM01.DBF',
'F:\Program\Oracle\oradata\PARSEDB2\SYSAUX01.DBF',
'F:\Program\Oracle\oradata\PARSEDB2\UNDOTBS01.DBF',
'F:\Program\Oracle\oradata\PARSEDB2\USERS01.DBF'
LOGFILE GROUP 1 ('F:\Program\Oracle\oradata\PARSEDB2\redo01.log') SIZE 51200K,
GROUP 2 ('F:\Program\Oracle\oradata\PARSEDB2\redo02.log') SIZE 51200K,
GROUP 3 ('F:\Program\Oracle\oradata\PARSEDB2\redo03.log') SIZE 51200K;


alter tablespace temp
            add tmpfile'F:\Program\Oracle\oradata\PARSEDB2\TEMP01.DBF'
            SIZE 200M REUSE AUTOEXTEND ON MAXSIZE 5G;

==================================================================================

实际问题解决记录:(无法启动到mount状态

ORA-03113: 通信通道的文件结尾,是一个通用的错误提示,很多错误都会产生这个错误提示。

本问题的最终原因是Control filesequence number mismatch




开始是通过网络连接方式(即如sqlplus user/mima@IP地址/服务名(或是sid,看sqlnet文件支持的命名方法))访问数据库服务端,发现错误提示如下:

ERROR:
ORA-27101 Shared memory realm does not exist
ORA-01034 ORACLE not available 

参看:解决ORA-01034/ORA-27101

于是,换成 以本地连接方式(即如sqlplus / as sysdba)访问数据库服务端,发现错误提示如下:

ERROR:
ORA-01031: insufficient privileges

解决该错误后,继续以本地连接方式(即如sqlplus / as sysdba)访问数据库服务端,发现错误提示如下:

已连接到空闲例程。

SQL> startup
ORACLE 例程已经启动。

ORA-03113: 通信通道的文件结尾

注释:

网络连接方式要经过Oracle数据库软件的SQL*NET层来间接访问数据库服务端,而本地连接方式不用经过该层直接访问数据库服务端。由此可以看出,因为网络连接方式要经过Oracle数据库软件的SQL*NET层来间接访问数据库服务端,即多了一个环节,所以由此获得的错误提示不易于发现错误提示的本质原因(SQL*NET层错误的干扰不易于发现数据库服务端实例的错误)。故而,每次以网络连接方式连接时若有问题,就先以本地连接方式访问数据库服务端,看是否会有错误提示出现,若有,说明是数据库服务端实例的错误,若是没有,则应该考虑SQL*NET层的错误(即网络问题)。

以本地连接方式(即如sqlplus / as sysdba)访问数据库服务端的具体实际操作过程如下:

Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。

C:\Users\h>set oracle_sid=parsedb2

C:\Users\h>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 21 13:20:27 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-01031: insufficient privileges


请输入用户名:  ^V
C:\Users\h>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 21 13:33:22 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-12560: TNS: 协议适配器错误


请输入用户名:  ^V^V
C:\Users\h>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 21 13:34:27 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-01031: insufficient privileges


请输入用户名:  ^V
C:\Users\h>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 21 13:47:36 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

已连接到空闲例程。

SQL> startup
ORACLE 例程已经启动。

Total System Global Area  778387456 bytes
Fixed Size                  1374808 bytes
Variable Size             444597672 bytes
Database Buffers          327155712 bytes
Redo Buffers                5259264 bytes
ORA-03113: 通信通道的文件结尾
进程 ID: 1340
会话 ID: 191 序列号: 1


SQL> quit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断


C:\Users\h>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 21 13:48:49 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

已连接到空闲例程。

SQL> startup
ORACLE 例程已经启动。

Total System Global Area  778387456 bytes
Fixed Size                  1374808 bytes
Variable Size             444597672 bytes
Database Buffers          327155712 bytes
Redo Buffers                5259264 bytes
ORA-03113: 通信通道的文件结尾
进程 ID: 5896
会话 ID: 191 序列号: 1


SQL>
SQL> +
SP2-0042: 未知命令 "+" - 其余行忽略。
SQL> archive log list;
ORA-24324: 未初始化服务句柄
ORA-01041: 内部错误, hostdef 扩展名不存在
SQL> quit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断


C:\Users\h>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 21 14:25:58 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

已连接到空闲例程。

SQL> archive log list;
ORA-01012: not logged on
SQL> startup mount;
ORACLE 例程已经启动。

Total System Global Area  778387456 bytes
Fixed Size                  1374808 bytes
Variable Size             444597672 bytes
Database Buffers          327155712 bytes
Redo Buffers                5259264 bytes
ORA-03113: 通信通道的文件结尾
进程 ID: 3196
会话 ID: 191 序列号: 1


SQL> startup nomount;
ORA-24324: 未初始化服务句柄
ORA-01041: 内部错误, hostdef 扩展名不存在
SQL> quit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断


C:\Users\h>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 21 14:26:54 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

已连接到空闲例程。

SQL> startup nomount;
ORACLE 例程已经启动。

Total System Global Area  778387456 bytes
Fixed Size                  1374808 bytes
Variable Size             444597672 bytes
Database Buffers          327155712 bytes
Redo Buffers                5259264 bytes
SQL> archive log list;
ORA-01507: ??????
SQL> alter database mount;
alter database mount
*
第 1 行出现错误:
ORA-03113: 通信通道的文件结尾
进程 ID: 4112
会话 ID: 191 序列号: 1


SQL> quit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断


C:\Users\h>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 21 15:27:20 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

已连接到空闲例程。

SQL> startup nomount;
ORACLE 例程已经启动。

Total System Global Area  778387456 bytes
Fixed Size                  1374808 bytes
Variable Size             444597672 bytes
Database Buffers          327155712 bytes
Redo Buffers                5259264 bytes
SQL> CREATE CONTROLFILE REUSE DATABASE "PARSEDB2"NORESETLOGS NOARCHIVELOG
  2  MAXINSTANCES 8
  3  MAXLOGHISTORY 1
  4  MAXLOGFILES 16
  5  MAXLOGMEMBERS 3
  6  MAXDATAFILES 100
  7  Datafile
  8  'F:\Program\Oracle\oradata\PARSEDB2\SYSTEM01.DBF',
  9  'F:\Program\Oracle\oradata\PARSEDB2\SYSAUX01.DBF',
 10  'F:\Program\Oracle\oradata\PARSEDB2\UNDOTBS01.DBF',
 11  'F:\Program\Oracle\oradata\PARSEDB2\USERS01.DBF'
 12  LOGFILE GROUP 1 ('F:\Program\Oracle\oradata\PARSEDB2\redo01.log') SIZE 5120
0K,
 13  GROUP 2 ('F:\Program\Oracle\oradata\PARSEDB2\redo02.log') SIZE 51200K,
 14  GROUP 3 ('F:\Program\Oracle\oradata\PARSEDB2\redo03.log') SIZE 51200K;

控制文件已创建。

SQL> RECOVER DATABASE;
完成介质恢复。
SQL> alter database open;

数据库已更改。

SQL> alter tablespace temp
  2              add tmpfile'F:\Program\Oracle\oradata\PARSEDB2\TEMP01.DBF'
  3              SIZE 200M REUSE AUTOEXTEND ON MAXSIZE 5G;
            add tmpfile'F:\Program\Oracle\oradata\PARSEDB2\TEMP01.DBF'
                *
第 2 行出现错误:
ORA-00905: ???????????????


SQL> alter tablespace temp
  2              add tempfile'F:\Program\Oracle\oradata\PARSEDB2\TEMP01.DBF'
  3              SIZE 200M REUSE AUTOEXTEND ON MAXSIZE 5G;

表空间已更改。

SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> quit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断


C:\Users\h>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 21 15:36:23 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

已连接到空闲例程。

SQL> startup
ORACLE 例程已经启动。

Total System Global Area  778387456 bytes
Fixed Size                  1374808 bytes
Variable Size             444597672 bytes
Database Buffers          327155712 bytes
Redo Buffers                5259264 bytes
数据库装载完毕。
数据库已经打开。
SQL> quit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断


C:\Users\h>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 21 15:37:11 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> conn hdl/123456
ERROR:
ORA-01017: 用户名/口令无效; 登录被拒绝


警告: 您不再连接到 ORACLE。
SQL> quit

C:\Users\h>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 11月 21 15:37:57 2014

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> alter user hdl identified by 123456;

用户已更改。

SQL> conn hdl/123456
已连接。
SQL>

====================================
ora-03113 controlfile sequence number mismatch 解决

http://www.iyunv.com/thread-15076-1-1.html

http://ljblog.sinaapp.com/?p=309


ora-03113 control file sequence number mismatch

Control file sequence number mismatch
http://blog.csdn.net/marvelyu/article/details/7432417

控制文件序列号不匹配

你可能感兴趣的:(解决ORA-03113: 通信通道的文件结尾(实质是Control filesequence number mismatch))