Oracle的JDBC驱动的版本你了解吗?
欢迎进入Java社区论坛,与200万技术人员互动交流 >>进入 在使用Oracle JDBC驱动时,有些问题你是不是通过替换不同版本的Oracle JDBC驱动来解决的?最常使用的ojdbc14.jar有多个版本,classes12.jar有多个版本你了解吗? 连接类型: 1、 JDBC OCI: oci是orac
欢迎进入Java社区论坛,与200万技术人员互动交流 >>进入
在使用Oracle JDBC驱动时,有些问题你是不是通过替换不同版本的Oracle JDBC驱动来解决的?最常使用的ojdbc14.jar有多个版本,classes12.jar有多个版本你了解吗?
连接类型:
1、 JDBC OCI: oci是oracle call interface的缩写,此驱动类似于传统的ODBC 驱动。因为它需要Oracle Call Interface and Net8,所以它需要在运行使用此驱动的JAVA程序的机器上安装客户端软件,其实主要是用到orcale客户端里以dll方式提供的oci和服务器配置。
2、JDBC Thin: thin是for thin client的意思,这种驱动一般用在运行在WEB浏览器中的JAVA程序。它不是通过OCI or Net8,而是通过Java sockets进行通信,是纯java实现的驱动,因此不 需要在使用JDBC Thin的客户端机器上安装orcale客户端软件,所以有很好的移植性,通常用在web开发中。
随Oracle 8i发布的 Oracle JDBC驱动8.1.7版本
classes111.zip 适用于JDK 1.1.x
classes12.zip 适用于JDK 1.2.x
只有zip文件无jar文件
随Oracle 9i发布的Oracle JDBC驱动9.2.0版本
新特性:
1、Thin连接类型的驱动对BFILE,BLOB,CLOB 提供直接支持,以前通常是调用PL/SQL来实现。
2、支持JDBC 3.0 特性
3、ojdbc14.jar 支持JDK 1.4
4、ojdbc14.jar 支持保存点(Savepoint)
5、可以在不同的连接池中使用PreparedStatement,这是重要的性能提升
从此以后新的jar文件的命名采用 ojdbc
classes111.jar 适用于JDK 1.1.x
classes12.jar 适用于JDK 1.2 and JDK 1.3 (我的项目环境JDK1.6,oracle 10g,windows,用了这个目前没发现问题)
ojdbc14.jar 适用于JDK 1.4
***_g.jar 只是用javac -g编译,生成所有调试信息,其它全一样
classes111.zip 适用于JDK 1.1.x
classes12.zip 适用于JDK 1.2.x
随Oracle 10.2发布的 Oracle JDBC驱动10.2版本
1、全面支持JDK 1.5
2、支持JDBC 3.0
classes12.jar 适用于JDK 1.2 and JDK 1.3.
ojdbc14.jar 适用于 JDK 1.4 and 5.0
***_g.jar 只是用javac -g编译,生成所有调试信息,其它全一样
随Oracle 11.1发布的 Oracle JDBC驱动11.1版本
新特性:
1、支持JDK6,支持JDBC 4.0,新的java.sql.SQLXML类型没有被支持,是使用ojdbc6.jar来支持。J2SE 5.0 和 JDBC 3.0 全面支持使用ojdbc5.jar。
2.不再支持oracle.jdbc.driver。从9.0.1开始的每个release都推荐使用oracle.jdbc。这一天终于到来,在11g中,引用oracle.jdbc.driver不再通过编译。
3.j2se 1.2,1.3,1.4不再支持。11R1不再包括这些版本的jar和zip,如果仍然使用这些版本,可以继续使用10gR2的jdbc。
4.11gR1 Thin driver支持AES加密算法,SHA1 hash算法,RADIUS, KERBEROS,SSL认证机制.
5.支持ANYDATE和ANYTYPE类型。这两种类型自9i引入,11R1前,程序员只能通过PL/SQL操作。
6.高级队列支持。11R1提供了访问AQ的高性能接口。
7.支持数据库变更通知。
8.Thin和OCI的数据库启动和关闭。11R1提供了这样的方法来启动和关闭数据库。
9.新的工厂方法。Oracle JDBC 11R1 oracle.jdbc.OracleConnection提供了创建Oracle对象的工厂方法。
包括ARRAY, BFILE, DATE, INTERVALDS, NUMBER, STRUCT, TIME,TIMESTAMP,TIMESTAMP等。
ojdbc5.jar: 适用于jdk5
ojdbc6.jar: 适用于jdk6
***_g.jar 只是用javac -g编译,生成所有调试信息,其它全一样
---------------------------------------------------
总体讲新版本的JDBC驱动 性能强、很多bug被发现并已解决。
我遇到的,之前使用ojdbc14.jar(不记得哪个版本了)批量插入10万条,实际只插入了3万多条,其它的丢失了,换ojdbc6.jar后,一次commit批量插入100万条也OK了。
尽量使用和数据库版本一致的驱动,有bug时,换高版本的JDBC驱动试试 。
如果一个jdbc的jar包你不知道是那个版本的,可以解压这个jar包,再META-INF\MANIFEST.MF 文件中找"Oracle JDBC Driver version - 10.1.0.2.0"字样,就知道版本了

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



To query the Oracle tablespace size, follow the following steps: Determine the tablespace name by running the query: SELECT tablespace_name FROM dba_tablespaces; Query the tablespace size by running the query: SELECT sum(bytes) AS total_size, sum(bytes_free) AS available_space, sum(bytes) - sum(bytes_free) AS used_space FROM dba_data_files WHERE tablespace_

There are three ways to view instance names in Oracle: use the "sqlplus" and "select instance_name from v$instance;" commands on the command line. Use the "show instance_name;" command in SQL*Plus. Check environment variables (ORACLE_SID on Linux) through the operating system's Task Manager, Oracle Enterprise Manager, or through the operating system.

Oracle View Encryption allows you to encrypt data in the view, thereby enhancing the security of sensitive information. The steps include: 1) creating the master encryption key (MEk); 2) creating an encrypted view, specifying the view and MEk to be encrypted; 3) authorizing users to access the encrypted view. How encrypted views work: When a user querys for an encrypted view, Oracle uses MEk to decrypt data, ensuring that only authorized users can access readable data.

Uninstall method for Oracle installation failure: Close Oracle service, delete Oracle program files and registry keys, uninstall Oracle environment variables, and restart the computer. If the uninstall fails, you can uninstall manually using the Oracle Universal Uninstall Tool.

Deleting all data in Oracle requires the following steps: 1. Establish a connection; 2. Disable foreign key constraints; 3. Delete table data; 4. Submit transactions; 5. Enable foreign key constraints (optional). Be sure to back up the database before execution to prevent data loss.

To create a user in Oracle, follow these steps: Create a new user using the CREATE USER statement. Grant the necessary permissions using the GRANT statement. Optional: Use the RESOURCE statement to set the quota. Configure other options such as default roles and temporary tablespaces.

Oracle Invalid numeric errors may be caused by data type mismatch, numeric overflow, data conversion errors, or data corruption. Troubleshooting steps include checking data types, detecting digital overflows, checking data conversions, checking data corruption, and exploring other possible solutions such as configuring the NLS_NUMERIC_CHARACTERS parameter and enabling data verification logging.

Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.
