Frequently Asked Questions

Open all Close all
  • Whats New in 19c?
  • Are there any Oracle Database Cloud Service related documents for Java developers?

JDBC in General

Release Specific Questions

  • Which version of JDBC drivers are supported ?
  • What is the JDBC and RDBMS interoperability matrix or the certification matrix?
  • What are the Oracle JDBC releases Vs JDK versions?
  • What are the Oracle JDBC releases Vs JDBC specifications?
  • Are the Oracle JDBC drivers certified against OpenJDK?
     
  • What is the recommended 19.x JDBC driver to be used with JDK11?     
  • What about the JDBC version which are not listed in the above table?
  • Where can I get the JDBC jar files?
  • What are the different JAR files on the 19.x JDBC driver download page for?

Oracle JDBC in General

  • What are the different JDBC drivers that Oracle provide?
  • Which driver should I use?
  • What about the Jars for the Server Thin Driver and the Server Internal Driver?
  • Can third party vendors distribute Oracle's JDBC drivers along with their own software?
  • What permissions do the Oracle JDBC drivers require?

Installation

  • How do I install the Thin driver?
  • How do I install the OCI driver?
  • How do I install the Server-Side Internal driver or the Thin in the server driver?

DriverManager and DataSources

  • What is the difference between the DriverManager and a DataSource?
  • Which connection pool should I use?
  • What is JDBC OCI Connection Pooling?

Connections

  • What is the form of a URL?
  • What is the form of the <database> description?
  • How do I use the Properties argument?
  • Don't I have to register the class OracleDriver with the DriverManager?
  • What username and password should I use when connecting to the Server Internal Driver?
  • I'm getting OutofMemory Error when I set a higher default prefetch value.
  • What is a service connect string?
  • How do I connect as SYSDBA or SYSOPER?
  • What encryption methods are supported by the Oracle JDBC drivers?
  • How do I turn on encryption and checksumming with the JDBC Thin driver?
  • What is proxy authentication?
  • Do Oracle JDBC drivers support SSL?
  • Do the Oracle JDBC drivers support LDAP in the connection URL?
  • How can I use JDBC to connect to a database server behind a firewall?

Statements, PreparedStatements, CallableStatements

  • What is defineColumnType and when should I use it?
  • Does defineColumnType force conversions on the Server?
  • How to turn off EscapeProcessing at the jdbc driver level instead of calling stmt.setEscapeProcessing(false) in application code?
  • Do the Oracle JDBC drivers provided a Bind by Name facility?
  • For setXXX methods in PreparedStatement how do the Oracle JDBC drivers determine the data type?
  • What happens if the type of the target parameter is not the same as the type assumed by the setXXX method?
  • Why do not the drivers do the conversion on the client side?
  • For inserting into a column in a table what are the byte data types?
  • For inserting into a column in a table what are the character data types?
  • What are the sizes for the setString, setCharacterStream, and setAsciiStream?
  • What are the size limit for binary data via setBytes and setBinaryStream?
  • What are the size limits for the proprietary methods setBytesForBlob, setStringForClob in oracle.jdbc.OraclePreparedStatement?
  • Does switching bind types force additional server side parsing of the statement?
  • What about CallableStatements and procedures with IN OUT parameters?
  • Will the selection of polymorphic PL/SQL procedures change when the bind type changes?
  • What about existing code?
  • For certain cases the driver is creating temporary lobs. Does it track these and free them?
  • We are using a variable width character set such as UTF8. Does the driver correct for the actual byte length of a sequence of characters?
  • Is it a good idea to use e.g. setString for a really huge string?
  • LONG RAW and LONG column types are deprecated. Why are there new uses of the setXXXStream API's?
  • The LOB API's are much more flexible, right?
  • Why can't I create a PreparedStatement that does select * from tab where id in (?, ?, ?, ...)?

ResultSets

  • What does "Exhausted Resultset: prepare_for_new_get" mean?
  • Why do I have to close ResultSets?

Simple Data Types

  • What is going on with DATE and TIMESTAMP?
  • What is the longest value I can bind?
  • Why is the result of reading a TIMESTAMP WITH TIME ZONE different?

Advanced Data Types (Objects)

  • How should I create instances of ADTs?
  • Why isn't the standard factory method createArrayOf supported?

BFILEs, BLOBs, CLOBs

  • What is DBMS_LOB.ERASE doing?
  • Can I use oracle.sql.CLOB.putChars()?
  • OCI provides function to manipulate a CLOB CharSetId. What is the JDBC equivalent?
  • Is writing into BLOBS is slower than inserting LONG RAWs ?
  • Why am I getting an ORA-03127 error when getting the LobLength in the Stream sample code?
  • When I get a CLOB from the database and then update it, sometimes my changes don't appear in the database. Why?

REF types

  • How can I pass an oracle.sql.REF between two different JDBC clients (EJBs, JDBC Clients, etc.)? As the REF class is not serializable?
  • How can I create a new REF?

OPAQUE types

  • What are OPAQUE types?

Row Sources

  • When I set the scrollability attribute after execute, it does not have any effect on the scrollability of the RowSet. Why?
  • Can I serialize the RowSet object to a flat file even if the RowSet contains streams?

Thin Driver

  • Can the Thin JDBC Driver be used to develop Java applications?

Server Internal Driver

  • When should I use the Server Internal Driver?

Server Thin Driver

  • When should I use the Server Thin Driver?

Errors

  • DriverManager.getConnection gives the Error: "No suitable driver"
  • Error Message: "UnsatisfiedLinkError with OCI driver"
  • Error Message: "ORA-1019: unable to allocate memory."
  • Error Message: "ORA-01000: maximum open cursors exceeded"
  • Error Message: "ORA-01002: fetch out of sequence"
  • Error Message: "ORA-12705: invalid or unknown NLS parameter value specified"
  • Error While Trying to Retrieve Text for Error ORA-12705.
  • Error Message: The JDBC Thin Driver Gives Me "invalid character" Errors for Unicode Literals
  • INSERT or UPDATE operations are slow
  • Error Message: "Connection reset by peer"
  • What does "Protocol Violation" mean?

Demo Programs

  • Are there any JDBC demo programs?
  • How do I run the demos?
  • What should I do when error happens when I run a demo?

Oracle JDBC Trace Facility

  • What is the JDBC Trace Facility?
  • How do I turn on the old JDBC trace?
  • How do I control the volume of trace output?
  • Where does the trace output go?
  • How can I turn off DMS in a DMS enabled jar?

Development Tools and Environments

  • Can I debug JDBC programs with Symantec Visual Cafe?
  • Can I debug JDBC programs with Microsoft's Visual J++?

Supported Features

  • Can the JDBC Drivers access PL/SQL Stored Procedures?
  • Do the JDBC Drivers support streaming?
  • Do the JDBC Drivers support multibyte character sets?
  • Do the JDBC Drivers work with firewalls?
  • Do Oracle's JDBC drivers support PL/SQL tables/result sets/records/booleans?
  • Is failover supported?
  • How do the JDBC drivers support Oracle ROWID datatypes? What does this have to do with getCursorName and setCursorName?
  • How do the JDBC drivers support Oracle REFCURSOR datatypes?
  • Does ANO work with JDBC drivers?
  • Can I serialize oracle.sql.* datatypes?
  • Do the JDBC Drivers support Objects or Collections?
  • Can I use WaitOption and AutoRollback?
  • Can a Java Stored Procedure in one database instance open a connection to another database instance?

Performance

  • Which is faster, the Thin driver or the OCI driver?
  • Which is faster, Statements or PreparedStatements?

java.util.logging

  • How do I use java.util.logging to get trace output from the Oracle JDBC drivers?
  • How do I configure java.util.logging to get useful trace output from Oracle JDBC?
  • What about the Server-Side Internal driver?