DB2 10.5 for Linux, UNIX, and Windows

IBM Data Server Driver for JDBC and SQLJ properties for DB2 for z/OS

Some of the IBM® Data Server Driver for JDBC and SQLJ properties apply only to DB2® for z/OS® servers.

Those properties are:

accountingInterval
Specifies whether DB2 accounting records are produced at commit points or on termination of the physical connection to the data source. The data type of this property is String.

If the value of accountingInterval is "COMMIT", and there are no open, held cursors, DB2 writes an accounting record each time that the application commits work. If the value of accountingInterval is "COMMIT", and the application performs a commit operation while a held cursor is open, the accounting interval spans that commit point and ends at the next valid accounting interval end point. If the value of accountingInterval is not "COMMIT", accounting records are produced on termination of the physical connection to the data source.

The accountingInterval property sets the accounting-interval parameter for an underlying RRSAF signon call. If the value of subsystem parameter ACCUMACC is not NO, the ACCUMACC value overrides the accountingInterval setting.

accountingInterval applies only to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity on DB2 for z/OS. accountingInterval is not applicable to connections under CICS® or IMS™, or for Java™ stored procedures.

The accountingInterval property overrides the db2.jcc.accountingInterval configuration property.

charOutputSize
Specifies the maximum number of bytes to use for INOUT or OUT stored procedure parameters that are registered as Types.CHAR charOutputSize applies only to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to DB2 for z/OS database servers.

Because DESCRIBE information for stored procedure INOUT and OUT parameters is not available at run time, by default, the IBM Data Server Driver for JDBC and SQLJ sets the maximum length of each character INOUT or OUT parameter to 32767. For stored procedures with many Types.CHAR parameters, this maximum setting can result in allocation of much more storage than is necessary.

To use storage more efficiently, set charOutputSize to the largest expected length for any Types.CHAR INOUT or OUT parameter.

charOutputSize has no effect on INOUT or OUT parameters that are registered as Types.VARCHAR or Types.LONGVARCHAR. The driver uses the default length of 32767 for Types.VARCHAR and Types.LONGVARCHAR parameters.

The value that you choose for charOutputSize needs to take into account the possibility of expansion during character conversion. Because the IBM Data Server Driver for JDBC and SQLJ has no information about the server-side CCSID that is used for output parameter values, the driver requests the stored procedure output data in UTF-8 Unicode. The charOutputSize value needs to be the maximum number of bytes that are needed after the parameter value is converted to UTF-8 Unicode. UTF-8 Unicode characters can require up to three bytes. (The euro symbol is an example of a three-byte UTF-8 character.) To ensure that the value of charOutputSize is large enough, if you have no information about the output data, set charOutputSize to three times the defined length of the largest CHAR parameter.

clientUser
Specifies the current client user name for the connection. This information is for client accounting purposes. Unlike the JDBC connection user name, this value can change during a connection. For a DB2 for z/OS server, the maximum length is 16 bytes.

This property applies only to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity on DB2 for z/OS.

clientWorkstation
Specifies the workstation name for the current client for the connection. This information is for client accounting purposes. This value can change during a connection. The data type of this property is String. For a DB2 for z/OS server, the maximum length is 18 bytes. A Java empty string ("") is valid for this value, but a Java null value is not valid.

This property applies only to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity on DB2 for z/OS.

currentLocaleLcCtype
Specifies the LC_CTYPE locale that is used to execute SQL statements that use a built-in function that references a locale. The data type of this property is String. If currentLocaleLcCtype is set, the IBM Data Server Driver for JDBC and SQLJ sets the CURRENT LOCALE LC_CTYPE special register on the data server to the property value. currentLocaleLcCtype has no default.

currentLocaleLcCtype can be set only at the start of a connection, and cannot be changed while the connection is active.

currentSQLID
Specifies:
  • The authorization ID that is used for authorization checking on dynamically prepared CREATE, GRANT, and REVOKE SQL statements.
  • The owner of a table space, database, storage group, or synonym that is created by a dynamically issued CREATE statement.
  • The implicit qualifier of all table, view, alias, and index names specified in dynamic SQL statements.
currentSQLID sets the value in the CURRENT SQLID special register on a DB2 for z/OS server. If the currentSQLID property is not set, the default schema name is the value in the CURRENT SQLID special register.
enableMultiRowInsertSupport
Specifies whether the IBM Data Server Driver for JDBC and SQLJ uses multi-row INSERT for batched INSERT or MERGE operations, when the target data server is a DB2 for z/OS server that supports multi-row INSERT. The batch operations must be PreparedStatement calls with parameter markers. The data type of this property is boolean. The default is true.

The enableMultiRowInsertSupport value cannot be changed for the duration of a connection. enableMultiRowInsertSupport must be set to false if INSERT FROM SELECT statements are executed in a batch. Otherwise, the driver throws a BatchUpdateException.

enableT2zosLBF
Specifies whether limited block fetch is used for connections that use IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to retrieve data from a table on a local DB2 for z/OS data server. The data type of this property is int. Possible values are:
com.ibm.db2.jcc.DB2BaseDataSource.NOT_SET (0) or not specified
This is the default.
  • For a connection to a DB2 for z/OS data server in Version 10 conversion mode, specifies that limited block fetch is not used for retrieving data from a local table using IBM Data Server Driver for JDBC and SQLJ type 2 connectivity.
  • For a connection to a DB2 for z/OS data server in Version 10 new-function mode or later, specifies that limited block fetch is used for retrieving data from a local table using IBM Data Server Driver for JDBC and SQLJ type 2 connectivity.
com.ibm.db2.jcc.DB2BaseDataSource.YES (1)
Specifies that limited block fetch is used for retrieving data from a local table using IBM Data Server Driver for JDBC and SQLJ type 2 connectivity.
com.ibm.db2.jcc.DB2BaseDataSource.NO (2)
Specifies that limited block fetch is not used for retrieving data from a local table using IBM Data Server Driver for JDBC and SQLJ type 2 connectivity.

enableT2zosLBF applies to DB2 for z/OS data servers in Version 10 new-function mode or later. enableT2zosLBF does not apply to retrieval of stored procedure result sets.

enableT2zosLBFSPResultSets
Specifies whether limited block fetch is used for connections that use IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to retrieve data from a stored procedure result set on a local DB2 for z/OS data server. The data type of this property is int. Possible values are:
com.ibm.db2.jcc.DB2BaseDataSource.YES (1) or com.ibm.db2.jcc.DB2BaseDataSource.NOT_SET (0)
Specifies that limited block fetch is used for retrieving data from a stored procedure result set using IBM Data Server Driver for JDBC and SQLJ type 2 connectivity. This is the default.
com.ibm.db2.jcc.DB2BaseDataSource.NO (2)
Specifies that limited block fetch is used for retrieving data from a stored procedure result set using IBM Data Server Driver for JDBC and SQLJ type 2 connectivity.

enableT2zosLBFSPResultSets applies to DB2 for z/OS data servers in Version 10 new-function mode or later.

extendedTableInfo
extendedTableInfo specifies whether information about extended table types is returned from a DatabaseMetaData.getTables method call. Currently, there is one extended table type: ACCEL-ONLY TABLE.
com.ibm.db2.jcc.DB2BaseDataSource.NO (2) or com.ibm.db2.jcc.DB2BaseDataSource.NOT_SET (0)
The result set that is returned by the DatabaseMetaData.getTables method does not contain columns for extended table types.

Rows for extended table types are returned only if "TABLE" is explicitly specified in the types parameter value. In this case, extended table types are listed as TABLE in the TABLE_TYPE column of the result set.

com.ibm.db2.jcc.DB2BaseDataSource.YES (1)
The result set that is returned by the DatabaseMetaData.getTables method contains rows and columns for extended table types. In particular:
  • The result set contains these extra columns, after the columns that are always returned in the result set from DatabaseMetaData.getTables:
    Table 1. Extra columns returned by DatabaseMetaData.getTables
    Column Name Data type Description
    TEMPORAL_TABLE_TYPE String Contains the type of temporal table. Possible values are:
    SYSTEM
    System-period temporal table.
    APPLICATION
    Application-period temporal table.
    BITEMPORAL
    Bitemporal table.
    Empty string
    Not a temporal table.

    This row is returned for connections to DB2 for z/OS Version 10 or later.

    IS_ACCELERATED String Indicates whether the table is an accelerated table. Possible values are YES or NO.

    This row is returned for connections to DB2 for z/OS Version 10 or later.

    ACCEL_ARCHIVE_STATUS String Contains the archive status of the table in the accelerator database. See the description of the ARCHIVE column in SYSACCEL.SYSACCELERATEDTABLES table (DB2 SQL) for the possible values and their meanings.

    This row is returned for connections to DB2 for z/OS Version 10 or later.

    IS_ARCHIVE_ENABLED String Indicates whether the table is an archive-enabled table. Possible values are YES or NO.

    This row is returned for connections to DB2 for z/OS Version 11 or later.

  • Rows for extended table types are returned under the following circumstances:
    • All table types are implicitly requested by specifying null in the types parameter value
    • An extended table type name is explicitly specified in the types parameter value.

      In this case, the extended table type is listed by its extended table type name in the TABLE_TYPE column of the result set.

jdbcCollection
Specifies the collection ID for the packages that are used by an instance of the IBM Data Server Driver for JDBC and SQLJ at run time. The data type of jdbcCollection is String. The default is NULLID.

This property is used with the DB2Binder -collection option. The DB2Binder utility must have previously bound IBM Data Server Driver for JDBC and SQLJ packages at the server using a -collection value that matches the jdbcCollection value.

The jdbcCollection setting does not determine the collection that is used for SQLJ applications. For SQLJ, the collection is determined by the -collection option of the SQLJ customizer.

jdbcCollection does not apply to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity on DB2 for z/OS.

maxConnCachedParamBufferSize
Specifies the maximum size of an internal buffer that is used for caching input parameter values for PreparedStatement objects. The buffer caches values on the native code side that are passed from the driver's Java code side for IBM Data Server Driver for JDBC and SQLJ type 2 connectivity on DB2 for z/OS. The buffer is used by all PreparedStatement objects for a Connection. The default is 1048576 (1MB). The default should be adequate for most users. Set maxConnCachedParamBufferSize to a larger value if many applications that run under the driver instance have PreparedStatement objects with large numbers of input parameters or large input parameters. The maxConnCachedParamBufferSize value should be larger than the maximum size of all input parameter data for a Connection. However, you also need to take into account the total number of connections and the maximum amount of memory that is available when you set the maxConnCachedParamBufferSize value.

The buffer exists for the life of a Connection, unless it reaches the maximum size. If that happens, the buffer is freed on each call to the native code. The corresponding buffer on the Java code side is freed on PreparedStatement.clearParameters and PreparedStatement.close calls. The buffers are not cleared if an application calls PreparedStatement.clearParameters, and the buffers have not reached the maximum size.

maxRowsetSize
Specifies the maximum number of bytes that are used for rowset buffering for each statement, when the IBM Data Server Driver for JDBC and SQLJ uses multiple-row FETCH for cursors. The data type of this property is int. The default is 32767.

maxRowsetSize applies only to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity on DB2 for z/OS.

reportLongTypes
Specifies whether DatabaseMetaData methods report LONG VARCHAR and LONG VARGRAPHIC column data types as long data types. The data type of this property is short. Possible values are:
com.ibm.db2.jcc.DB2BaseDataSource.NO (2) or com.ibm.db2.jcc.DB2BaseDataSource.NOT_SET (0)
Specifies that DatabaseMetaData methods that return information about a LONG VARCHAR or LONG VARGRAPHIC column return java.sql.Types.VARCHAR in the DATA_TYPE column and VARCHAR or VARGRAPHIC in the TYPE_NAME column of the result set. This is the default for DB2 for z/OS Version 9 or later.
com.ibm.db2.jcc.DB2BaseDataSource.YES (1)
Specifies that DatabaseMetaData methods that return information about a LONG VARCHAR or LONG VARGRAPHIC column return java.sql.Types.LONGVARCHAR in the DATA_TYPE column and LONG VARCHAR or LONG VARGRAPHIC in the TYPE_NAME column of the result set.
sendCharInputsUTF8
Specifies whether the IBM Data Server Driver for JDBC and SQLJ converts character input data to the CCSID of the DB2 for z/OS database server, or sends the data in UTF-8 encoding for conversion by the database server. sendCharInputsUTF8 applies to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to DB2 for z/OS database servers only. The data type of this property is int. If this property is also set at the driver level (db2.jcc.sendCharInputsUTF8), this value overrides the driver-level value.
Possible values are:
com.ibm.db2.jcc.DB2BaseDataSource.NO (2)
Specifies that the IBM Data Server Driver for JDBC and SQLJ converts character input data to the target encoding before the data is sent to the DB2 for z/OS database server. com.ibm.db2.jcc.DB2BaseDataSource.NO is the default.
com.ibm.db2.jcc.DB2BaseDataSource.YES (1)
Specifies that the IBM Data Server Driver for JDBC and SQLJ sends character input data to the DB2 for z/OS database server in UTF-8 encoding. The database server converts the data from UTF-8 encoding to the target CCSID.

Specify com.ibm.db2.jcc.DB2BaseDataSource.YES only if conversion to the target CCSID by the SDK for Java causes character conversion problems. The most common problem occurs when you use IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to insert a Unicode line feed character (U+000A) into a table column that has CCSID 37, and then retrieve that data from a non-z/OS client. If the SDK for Java does the conversion during insertion of the character into the column, the line feed character is converted to the EBCDIC new line character X'15'. However, during retrieval, some SDKs for Java on operating systems other than z/OS convert the X'15' character to the Unicode next line character (U+0085) instead of the line feed character (U+000A). The next line character causes unexpected behavior for some XML parsers. If you set sendCharInputsUTF8 to com.ibm.db2.jcc.DB2BaseDataSource.YES, the DB2 for z/OS database server converts the U+000A character to the EBCDIC line feed character X'25' during insertion into the column, so the character is always retrieved as a line feed character.

Conversion of data to the target CCSID on the database server might cause the IBM Data Server Driver for JDBC and SQLJ to use more memory than conversion by the driver. The driver allocates memory for conversion of character data from the source encoding to the encoding of the data that it sends to the database server. The amount of space that the driver allocates for character data that is sent to a table column is based on the maximum possible length of the data. UTF-8 data can require up to three bytes for each character. Therefore, if the driver sends UTF-8 data to the database server, the driver needs to allocate three times the maximum number of characters in the input data. If the driver does the conversion, and the target CCSID is a single-byte CCSID, the driver needs to allocate only the maximum number of characters in the input data.

sessionTimeZone
Specifies the setting for the CURRENT SESSION TIME ZONE special register. The data type of this property is String.

The sessionTimeZone value is a time zone value that is in the format of sth:tm. s is the sign, th is the time zone hour, and tm is time zone minutes. The range of valid values is -12:59 to +14:00.

sqljAvoidTimeStampConversion
Specifies whether a date that falls in the range of October 5, 1582 to October 14, 1582, inclusive, is retrieved from the data server without date adjustment to a value between October 15, 1582, and October 24, 1582, inclusive. The value for sqljAvoidTimeStampConversion must be true or false. The default is false.

This property applies only to SQLJ.

sqljEnableClassLoaderSpecificProfiles
Specifies whether the IBM Data Server Driver for JDBC and SQLJ allows using and loading of SQLJ profiles with the same Java name in multiple J2EE application (.ear) files. The data type of this property is boolean. The default is false. sqljEnableClassLoaderSpecificProfiles is a DataSource property. This property is primarily intended for use with WebSphere® Application Server.
ssid
Specifies the name of the local DB2 for z/OS subsystem to which a connection is established using IBM Data Server Driver for JDBC and SQLJ type 2 connectivity on DB2 for z/OS. The data type of this property is String.

The ssid property overrides the db2.jcc.ssid configuration property.

ssid can be the subsystem name for a local subsystem or a group attachment name or subgroup attachment name.

Specification of a single local subsystem name allows more than one subsystem on a single LPAR to be accessed as a local subsystem for connections that use IBM Data Server Driver for JDBC and SQLJ type 2 connectivity.

Specification of a group attachment name or subgroup attachment name allows failover processing to occur if a data sharing group member fails. If the DB2 subsystem to which an application is connected fails, the connection terminates. However, when new connections use that group attachment name or subgroup attachment name, DB2 for z/OS uses group or subgroup attachment processing to find an active DB2 subsystem to which to connect.

ssid applies only to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to DB2 for z/OS.

useRowsetCursor
Specifies whether the IBM Data Server Driver for JDBC and SQLJ always uses multiple-row FETCH for scrollable cursors if the data source supports multiple-row FETCH. The data type of this property is boolean.

This property applies only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity, or to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to DB2 for z/OS. If the enableRowsetSupport property is not set, the default for useRowsetCursor is true. If the enableRowsetSupport property is set, the useRowsetCursor property is not used.

Applications that use the JDBC 1 technique for performing positioned update or delete operations should set useRowSetCursor to false. Those applications do not operate properly if the IBM Data Server Driver for JDBC and SQLJ uses multiple-row FETCH.