Oracle thin driver vs. OCI driver. Pros and Cons?

↘锁芯ラ 提交于 2020-01-12 12:03:15

问题


When you develop a Java application that talks to oracle DBs, there are 2 options right? One is oracle thin driver, and the other is OCI driver that requires its own installation (please correct if I'm misunderstanding).

Now, what are the pros and cons? Obviously thin driver sounds much better in terms of installation, but is there anything that OCI can and the thin one can't?

Develop environment is Tomcat6 + Spring 3.0 + JPA(Hibernate) + apache-DBCP


回答1:


The choice of the driver depends several factors. The nature of your calls to database (e.g. it seem like your app won't be using lots of stored proc calls), requirements for failover (e.g. clustered Oracle servers) and distributed transactions. Generally it is recommended to use the thin driver, but if there is some specific feature of the OCI driver that you just must have you may have to consider the OCI driver. It also been said that drivers in Oracle 10 and higher do have matching capabilities and there is practically no performance difference on modern JVMs.




回答2:


Unless you have a dependency on a feature that is only available in the JDBC-OCI driver and not in the JDBC-thin driver, the recommendation from Oracle is to use thin. The most recent Oracle Database features such as Transaction Guard or Application Continuity are only available in the JDBC-thin driver. The thin driver is also more used than the JDBC-OCI driver so bugs will be fixed more quickly. It's considered as more stable. If you're still not convinced think that Oracle Weblogic Server ships with the JDBC-thin driver only.



来源:https://stackoverflow.com/questions/2896265/oracle-thin-driver-vs-oci-driver-pros-and-cons

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