ORACLE .net應用程式透過ODP.NET連線oracle12c之ORA-03137

清風艾艾發表於2017-06-14
    資料庫伺服器作業系統:
  [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   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 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29357786/viewspace-2140726/,如需轉載,請註明出處,否則將追究法律責任。

相關文章