我应该使用哪种JDBC驱动程序类型来访问Oracle数据库? [英] Which JDBC driver type should I use for accessing an Oracle Database?
问题描述
我们在AIX上的Tomcat WebServer中运行J2EE应用程序。
We're running a J2EE Application inside a Tomcat WebServer on AIX.
我们需要访问Oracle数据库的一些视图和存储过程。这个oracle数据库不是我们的应用程序所基于的,而是我们必须与之通信的外部系统。
We need to access a few Views and Stored Procedures of an Oracle Database. This oracle datebase is not the one our application is based on, but an external system we have to communicate with.
据我所知,从现在开始,我们将继续在高负载和每小时一些存储过程调用(如果有)的情况下,每分钟可以获得1000个SELECT。
As far as I can tell from now, we are going to get around a 1000 SELECTs per minute on high load and a few stored procedure calls per hour, if any.
在这种情况下最适合使用哪种JDBC驱动程序类型?
Which JDBC driver type would be the best to use in this situation?
据我所知类型4似乎是要走的路,但我无法通过Oracle或其他一些可靠的来源找到关于此的明确陈述。
As far as I have gathered type 4 seems to be the way to go, but I haven't been able to find a definite statement about this by Oracle or some other reliable source.
推荐答案
Type 4(thin)驱动程序是Oracle推荐的驱动程序。
The Type 4 ("thin") driver is the recommended driver by Oracle.
使用OCI(thick)驱动程序的唯一原因是当您需要RAC的高级功能时,例如透明应用程序故障转移(TAF)。对于其他所有内容,建议使用瘦驱动程序。
The only reason to use the OCI ("thick") driver is when you need the advanced features of a RAC such as transparent application failover (TAF). For everything else the thin driver is recommended.
有关详细信息,请参阅JDBC Developer's Guide:
http://download.oracle.com/docs/cd/B28359_01/java.111/b31224 /overvw.htm#BABCHIGI
See the JDBC Developer's Guide for details:
http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/overvw.htm#BABCHIGI
最重要的一句话可能是:
The most important sentence is probably:
通常,除非您需要特定于OCI的功能,例如支持非TCP / IP网络,否则请使用JDBC Thin驱动程序。
这篇关于我应该使用哪种JDBC驱动程序类型来访问Oracle数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!