JDBC Driver
From Ingres Community Wiki
Contents |
JDBC Driver
The Ingres JDBC Driver is a pure Java implementation of the JDBC 3.0 API - see below for Java version support. The driver supports application, applet, and servlet access to Ingres data sources through the Ingres Data Access Server (DAS). The Ingres JDBC Driver is delivered as a single Java archive file, named iijdbc.jar, located in the library directory (lib) of the Ingres instance. Depending on the Java environment used, access to the driver requires adding the Java archive to the CLASSPATH environment setting or as a resource in the appropriate utility. For browser/applet access, the Java archive must be copied to the Web Server directories.
The Ingres JDBC driver enables JDBC-enabled applications to access Ingres, Enterprise Access and EDBC databases.
Sun Java 2 SDK Version Support
Ingres 2006r2 supports Java 1.4 and higher Ingres 2006r3 supports Java 1.5 and higher
Getting the driver
The JDBC driver is bundled with the base ingres package under $II_SYSTEM/ingres/lib and is called iijdbc.jar. More recently, we have made the driver available in both source and binary form on the Connectivity Tools page.
Setup
To use the JDBC driver, simply add /path/to/iijdbc.jar to your CLASSPATH.
Example code can be found in JDBC_Code_Samples.
Known Issues and Limitations
Performance Tips
- Specify attribute CURSOR=READONLY on ALL Ingres JDBC urls.
- This will improve performance because it sets the default behavior for cursors to READONLY which enables block fetching of data wherever possible. Otherwise, the default is updatable cursors and data is generally retrieved a row at a time. This became the default with Ingres 2006r2.
- If multiple cursors must be kept open when autocommit is on, specify attribute AUTO=MULTI on the Ingres JDBC url.
- Do not using this unless truly needed. Java/JDBC applications sometimes expect the DBMS to support multiple cursors across autocommits; Ingres does not, but the JDBC driver works around this with this attribute setting. The symptom indicating the need for this attribute is an error such as: "No MST is currently in progress, cannot declare another cursor"
anything else?
