Oracle 瘦驱动程序与 OCI 驱动程序。优点和缺点?

发布于 2024-09-02 21:37:30 字数 227 浏览 6 评论 0原文

当您开发与 Oracle DB 通信的 Java 应用程序时,有 2 个选项,对吗?一种是oracle Thin驱动,另一种是OCI驱动,需要自己安装(如有误解,请指正)。

现在,有哪些优点和缺点?显然thin驱动程序在安装方面听起来要好得多,但是有什么是OCI可以而thin驱动程序不能的吗?

开发环境为Tomcat6 + Spring 3.0 + JPA(Hibernate) + apache-DBCP

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧人九事 2024-09-09 21:37:31

驱动程序的选择取决于几个因素。对数据库的调用的性质(例如,您的应用程序似乎不会使用大量存储的过程调用)、故障转移的要求(例如集群 Oracle 服务器)和分布式事务。一般来说,建议使用精简驱动程序,但如果 OCI 驱动程序有某些特定功能是您必须具备的,则可能需要考虑 OCI 驱动程序。还有人说,Oracle 10 及更高版本中的驱动程序确实具有匹配的功能,并且在现代 JVM 上几乎没有性能差异。

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.

爱人如己 2024-09-09 21:37:31

除非您依赖于仅在 JDBC-OCI 驱动程序中可用而不在 JDBC-thin 驱动程序中可用的功能,否则 Oracle 建议使用 Thin。最新的 Oracle 数据库功能(例如事务防护或应用程序连续性)仅在 JDBC 瘦驱动程序中可用。瘦驱动程序也比 JDBC-OCI 驱动程序使用得更多,因此可以更快地修复错误。它被认为更稳定。如果您仍然不相信,请认为 Oracle Weblogic Server 仅附带 JDBC 瘦驱动程序。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文