IBM Data Server Driver for JDBC and SQLJ extensions to JDBC
The IBM® Data Server Driver for JDBC and SQLJ provides a set of extensions to the support that is provided by the JDBC specification.
To use IBM Data Server Driver for JDBC and
SQLJ-only
methods in classes that have corresponding, standard classes, cast
an instance of the related, standard JDBC class to an instance of
the IBM Data Server Driver for JDBC and
SQLJ-only
class. For example:
javax.sql.DataSource ds =
new com.ibm.db2.jcc.DB2SimpleDataSource();
((com.ibm.db2.jcc.DB2BaseDataSource) ds).setServerName("sysmvs1.stl.ibm.com");
Table 1 summarizes
the IBM Data Server Driver for JDBC and
SQLJ-only
interfaces.
Interface name | Applicable data sources | Purpose |
---|---|---|
DB2CallableStatement | 1, 2 | Extends the java.sql.CallableStatement and the com.ibm.db2.jcc.DB2PreparedStatement interfaces. |
DB2Connection | 1, 2, 3 | Extends the java.sql.Connection interface. |
DB2DatabaseMetaData | 1, 2, 3 | Extends the java.sql.DatabaseMetaData interface. |
DB2Diagnosable | 1, 2, 3 | Provides a mechanism for getting Db2 diagnostics from a Db2 SQLException. |
DB2JSONResultSet | 1, 2, 3 | Used for converting the contents of JDBC ResultSet objects to JSON documents and snippets. |
DB2ParameterMetaData | 2 | Extends the java.sql.ParameterMetaData interface. |
DB2PreparedStatement | 1, 2, 3 | Extends the com.ibm.db2.jcc.DB2Statement and java.sql.PreparedStatement interfaces. |
DB2ResultSet | 1, 2, 3 | Extends the java.sql.ResultSet interface. |
DB2RowID | 1, 2 | Used for declaring Java objects for use with the ROWID data type. |
DB2Statement | 1, 2, 3 | Extends the java.sql.Statement interface. |
DB2Struct | 2 | Provides methods for working with java.sql.Struct objects. |
DB2SystemMonitor | 1, 2, 3 | Used for collecting system monitoring data for a connection. |
DB2TraceManagerMXBean | 1, 2, 3 | Provides the MBean interface for the remote trace controller. |
DB2Xml | 1, 2 | Used for updating data in XML columns and retrieving data from XML columns. |
DBBatchUpdateException | 1, 2, 3 | Used for retrieving error information about batch execution of statements that return automatically generated keys. |
Note: The interface applies to
connections to the following data sources:
|
Table 2 summarizes
the IBM Data Server Driver for JDBC and
SQLJ-only
classes.
Class name | Applicable data sources | Purpose |
---|---|---|
DB2Administrator | 2 | Instances of the DB2Administrator class are used to retrieve DB2CataloguedDatabase objects. |
DB2BaseDataSource | 1, 2, 3 | The abstract data source parent class for all IBM Data Server Driver for JDBC and SQLJ-specific implementations of javax.sql.DataSource, javax.sql.ConnectionPoolDataSource, and javax.sql.XADataSource. |
DB2Binder | 1, 2 | Provides the runJDBCBinder method as an alternative to the DB2Binder utility for binding IBM Data Server Driver for JDBC and SQLJ packages. |
DB2BlobFileReference | 1 | A subclass of DB2FileReference for creating BLOB file reference variable objects. |
DB2CataloguedDatabase | 2 | Contains methods that retrieve information about a local Db2 on Linux, UNIX, and Windows systems database. |
DB2ClientRerouteServerList | 1, 2 | Implements the java.io.Serializable and javax.naming.Referenceable interfaces. |
DB2ClobFileReference | 1 | A subclass of DB2FileReference for creating CLOB file reference variable objects. |
DB2ConnectionPool | 1, 2 | Provides constructors, methods, and properties for managing connection pooling. |
DB2ConnectionPoolDataSource | 1, 2, 3 | A factory for PooledConnection objects. |
DB2DataSource | 1, 2, 3 | Extends the extends DB2BaseDataSource class, and implements the javax.sql.DataSource, java.io.Serializable, and javax.naming.Referenceable interfaces. |
DB2Driver | 1, 2, 3 | Extends the java.sql.Driver interface. |
DB2ExceptionFormatter | 1, 2, 3 | Contains methods for printing diagnostic information to a stream. |
DB2FileReference | 1 | Provides methods for inserting data into tables from file reference variables. |
DB2JCCPlugin | 2 | The abstract class for implementation of JDBC security plug-ins. |
DB2PooledConnection | 1, 2, 3 | Provides methods that an application server can use to switch users on a preexisting trusted connection. |
DB2PoolMonitor | 1, 2 | Provides methods for monitoring the global transport objects pool for the connection concentrator and sysplex workload balancing. |
DB2SimpleDataSource | 1, 2, 3 | Extends the DataBaseDataSource class. Does not support connection pooling or distributed transactions. |
DB2Sqlca | 1, 2, 3 | An encapsulation of the Db2 SQLCA. |
DB2TraceManager | 1, 2, 3 | Controls the global log writer. |
DB2Types | 1 | Defines data type constants. |
DB2Version | 1, 2, 3 | Provides methods that return information about the IBM Data Server Driver for JDBC and SQLJ version. |
DB2XADataSource | 1, 2, 3 | A factory for XADataSource objects. An object that implements this interface is registered with a naming service that is based on the Java Naming and Directory Interface (JNDI). |
DB2XmlAsBlobFileReference | 1 | A subclass of DB2FileReference for creating XML AS BLOB file reference variable objects. |
DB2XmlAsClobFileReference | 1 | A subclass of DB2FileReference for creating XML AS CLOB file reference variable objects. |
DBTimestamp | 1, 2, 3 | A subclass of Timestamp that handles timestamp values with extra precision or time zone information. |
LoadResult | 1 | Provides methods for returning the results of a DB2Connection.zLoad invocation. |
Note: The class applies to connections
to the following data sources:
|