oracle12cORA-03114
(2020-01-01 12:04:43)
标签:
王显伟oracle12cora-03114sqlnet.use_zero_copyit |
分类: ORACLE常见问题处理 |
环境描述:
OS:linux 7.4
DB:12.2.0.1
patch:30116802
背景描述:
某客户应用oracle数据库最新季度191015补丁30116802后,PL/SQL访问带有BLOB字段的部分行时,报错“ORA-03114: not
connected to
ORACLE",数据库日志和监听日志并没有任何异常,在应用程序上,下载部分文件时,下载一半时应用程序报错”java.io.IOException:
IO 错误: 远程主机强迫关闭了一个现有的连接”
正常情况下,有任何异常至少在oracle的alert日志或者监听日志至少有异常,现在没有任何报错,一度怀疑是网络或者是应用程序本身的bug,但是开发人员反馈没有应用补丁前程序和PLSQL访问是正常的,网络也没有做任何变更,那么很明显跟oracle的季度补丁有关系,因为跟BLOB字段访问有关,查询MOS发现Connection
Reset By Peer When Doing A Query On A BLOB (文档 ID
2399524.1),跟这个问题极为像似,解决方案是在程序中添加以下参数:
-Doracle.net.useZeroCopyIO=false
-Doracle.jdbc.ReadTimeout=1800 (n is
in milliseconds)
-Doracle.net.keepAlive=true
开发人员反馈,这个应用程序不适用这个参数,让从数据库层面进行解决,Zero-Copy
I/O protocol官方解决如下:Zero-Copy
I/O protocol:
turned on by default. Turning it off in a RAC database environment
could be beneficial. Set the initialization
parameter to
turn o ff the Zero-Copy I/O protocol
_use_zero_copy_io=FALSE 该参数默认是开启的,在RAC环境下建议关闭,但是这个隐含参数“_use_zero_copy_io=FALSE”客户是生产环境,重启流程极为复杂,那有没有其它解决方案呢?
在MOS上发现“Java.sql.SQLException:
ORA-12582: TNS:invalid Operation Error Reported On The Application
Log (文档 ID 2583448.1)”也与BLOB字段访问有关,解决方案是:
Set the following property in the
database side sqlnet.ora:
SQLNET.USE_ZERO_COPY_IO=0
Or, on the application side, set this Java option to run the
application:
-Doracle.net.useZeroCopyIO=false
After this change, restart the database listener or the application based on the side this change was performed.
Or, on the application side,
After this change, restart the database listener or the application based on the side this change was performed.
在业务低谷时,在sqlnet.ora文件中添加SQLNET.USE_ZERO_COPY_IO=0,然后reload监听后,PL/SQL再次查询不再报错,应用程序访问正常,至此问题得到解决
该问题在oracle mos官方上并没有现场的解决方案,希望能帮到其他遇到同样问题的朋友
前一篇:[-7105]:管道连接超时
后一篇:初识MongoDB数据库

加载中…