ORACLE .net应用程序通过ODP.NET连接oracle12c之ORA-03137

来源:互联网 发布:大数据时代 微盘 编辑:程序博客网 时间:2024/05/21 08:39
  数据库服务器操作系统:
  [ora12c@ora29 trace]$ uname -a
  Linux ora29 2.6.39-400.17.1.el6uek.x86_64 #1 SMP Fri Feb 22 18:16:18 PST 2013 x86_64 x86_64 x86_64 GNU/Linux
  [ora12c@ora29 trace]$ 
  数据库版本:
[ora12c@ora29 trace]$ sqlplus -v
SQL*Plus: Release 12.2.0.1.0 Production
[ora12c@ora29 trace]$ 
   今天,测试同事反应,他们.net应用程序连接的12c数据库出问题了,客户端应用程序报错:

登录数据库服务器,查看告警日志也发现一大堆的类似报错:
2017-06-14T13:16:40.873489+08:00
Errors in file /u03/app/diag/rdbms/ora12c/ora12c/trace/ora12c_ora_12761.trc  (incident=26305):
ORA-03137: 来自客户机的格式错误的 TTC 包被拒绝: [kpoal8Check-3] [49152] [0] [0x000000000] [34856] [] [] []
2017-06-14T13:16:40.876466+08:00
Session (7,27633): Bad TTC Packet Detected: Inbound connection from client
Session (7,27633): Bad TTC Packet Detected: DB Logon User: BMITEST, Remote Machine: IIS APPPOOL\SE28, Program: w3wp.exe, OS User: WJW
Session (7,27633): Bad TTC Packet Detected: Client IP Address: 10.117.130.28
2017-06-14T13:22:23.986783+08:00
Errors in file /u03/app/diag/rdbms/ora12c/ora12c/trace/ora12c_ora_14136.trc  (incident=26260):
ORA-03137: 来自客户机的格式错误的 TTC 包被拒绝: [kpoal8Check-3] [49152] [0] [0x000000000] [34856] [] [] []
2017-06-14T13:22:23.988291+08:00
Session (254,48328): Bad TTC Packet Detected: Inbound connection from client
Session (254,48328): Bad TTC Packet Detected: DB Logon User: BMITEST, Remote Machine: IIS APPPOOL\SE28, Program: w3wp.exe, OS User: WJW
Session (254,48328): Bad TTC Packet Detected: Client IP Address: 10.117.130.28
查看trc文件内容,没有有价值的东西:
[ora12c@ora29 trace]$ cat /u03/app/diag/rdbms/ora12c/ora12c/trace/ora12c_ora_14136.trc  
Trace file /u03/app/diag/rdbms/ora12c/ora12c/trace/ora12c_ora_14136.trc
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Build label:    RDBMS_12.2.0.1.0_LINUX.X64_170125
ORACLE_HOME:    /u03/app/oracle/product/12.2.0/db_1
System name: Linux
Node name: ora29
Release: 2.6.39-400.17.1.el6uek.x86_64
Version: #1 SMP Fri Feb 22 18:16:18 PST 2013
Machine: x86_64
Instance name: ora12c
Redo thread mounted by this instance: 1
Oracle process number: 82
Unix process pid: 14136, image: oracle@ora29
*** 2017-06-14T13:22:23.987987+08:00
*** SESSION ID:(254.48328) 2017-06-14T13:22:23.988026+08:00
*** CLIENT ID:() 2017-06-14T13:22:23.988035+08:00
*** SERVICE NAME:(ora12c) 2017-06-14T13:22:23.988044+08:00
*** MODULE NAME:(w3wp.exe) 2017-06-14T13:22:23.988053+08:00
*** ACTION NAME:() 2017-06-14T13:22:23.988061+08:00
*** CLIENT DRIVER:(ODPM.NET) 2017-06-14T13:22:23.988069+08:00
DDE: Problem Key 'ORA 3137 [kpoal8Check-3]' was flood controlled (0x6) (incident: 26260)
ORA-03137: 来自客户机的格式错误的 TTC 包被拒绝: [kpoal8Check-3] [49152] [0] [0x000000000] [34856] [] [] []
[ora12c@ora29 trace]$ 
   查询oracle metalink网站,发现一个类似的报错文章:
ORA-03137: Malformed TTC Packet From Client Rejected: [kpoal8Check-3] [49152] (文档 ID 2267564.1)

APPLIES TO:
Oracle Data Provider for .NET - Version 12.1.0.2 and later
Microsoft Windows (32-bit)
Microsoft Windows x64 (64-bit)

SYMPTOMS
After upgrading Oracle client from 11.2.0.4.0 to 12.1.0.2.0, .NET application which is using ODP.NET Managed driver to connect Oracle database is throwing the error as below :
ORA-03137: Malformed TTC Packet From Client Rejected: [kpoal8Check-3] [49152]
The error occurs when a query is executed against the Oracle database from .NET application. Same query works fine if it is executed from SQL*PLUS environment.

CAUSE
While upgrading Oracle client if previous version of the ODP.NET dlls still exist in system, it leads to the error as described earlier.
The issue is discussed in internal bug.

SOLUTION
To resolve the issue, download and apply the WINDOWS DB BUNDLE PATCH 12.1.0.2.170418  Patch 25632533 or latest on Oracle client 12.1.0.2.
由于本地数据库是oracle 12.2.0.1 for linux 6.4,但是数据库后台所报的错误是相同的,然而,MOS上没有找到对应linux平台的Patch,目前只能升级ODP.NET
经过沟通,开发同事反馈.net应用程序使用的12c数据库连接驱动确实是ODP.NET,现在需要升级到122cR1升级包是ODP.NET_Managed_ODAC122cR1.zip 
原创粉丝点击