oracle.net.READ_TIMEOUT vs. oracle.jdbc.ReadTimeout

a 夏天 提交于 2019-12-21 12:42:50

问题


I tried setting oracle.net.READ_TIMEOUT as connection properties but it seems like it is not working, however setting oracle.jdbc.ReadTimeout works. Any idea why? I am using 11g JDBC Drivers. And the DB server version is 11g.


回答1:


According to http://www.javamonamour.org/2012/09/oraclenetconnecttimeout.html

oracle.net.READ_TIMEOUT for jdbc versions < 10.1.0.5 oracle.jdbc.ReadTimeout for jdbc versions >=10.1.0.5

So if you are using a JDBC driver version 10.1.0.5 or higher, then oracle.jdbc.ReadTimeout is the correct property.




回答2:


try reading the Oracle Document "How to Ensure that JDBC Queries are Always Timed Out (Doc ID 559564.1)" They suggest using one of these properties:

for the Thin driver:  oracle.net.ns.SQLnetDef.TCP_CONNTIMEOUT_STR
for the OCI driver:  sqlnet.outbound_connection_timeout

I haven't tested myself so I cannot guarantee it actually solves the issue.




回答3:


Unfortunately that document requires an Oracle Support account to access.



来源:https://stackoverflow.com/questions/18511582/oracle-net-read-timeout-vs-oracle-jdbc-readtimeout

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!