Common IBM Data Server Driver for JDBC and SQLJ properties for Db2 servers

Some of the IBM Data Server Driver for JDBC and SQLJ properties apply to Db2 data servers only.

Unless otherwise noted, all properties are in com.ibm.db2.jcc.DB2BaseDataSource.

Those properties are:

clientAccountingInformation
Specifies accounting information 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. The maximum length is 255 bytes. A Java™ empty string ("") is valid for this value, but a Java null value is not valid.
clientApplicationInformation
Specifies the application or transaction name of the end user's application. You can use this property to provide the identity of the client end user for accounting and monitoring 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 32 bytes. For a Db2 on Linux®, UNIX, and Windows systems server, the maximum length is 255 bytes. A Java empty string ("") is valid for this value, but a Java null value is not valid.
clientProgramId
Specifies a value for the client program ID that can be used to identify the end user. The data type of this property is String, and the length is 80 bytes. If the program ID value is less than 80 bytes, the value must be padded with blanks.
clientProgramName
Specifies an application ID that is fixed for the duration of a physical connection for a client. The value of this property becomes the correlation ID on a Db2 for z/OS server. Database administrators can use this property to correlate work on a Db2 for z/OS server to client applications. The data type of this property is String. The maximum length is 12 bytes. If this value is null, the IBM Data Server Driver for JDBC and SQLJ supplies a value of db2jccthread-name.

This property applies only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.

concurrentAccessResolution
Specifies whether the IBM Data Server Driver for JDBC and SQLJ requests that a read transaction can access a committed and consistent image of rows that are incompatibly locked by write transactions, if the data source supports accessing currently committed data, and the application isolation level is cursor stability (CS) or read stability (RS). This option has the same effect as the Db2 CONCURRENTACCESSRESOLUTION bind option. Possible values are:
DB2BaseDataSource.-
CONCURRENTACCESS_USE_CURRENTLY_COMMITTED (1)
The IBM Data Server Driver for JDBC and SQLJ requests that:
  • Read transactions access the currently committed data when the data is being updated or deleted.
  • Read transactions skip rows that are being inserted.
DB2BaseDataSource.CONCURRENTACCESS_WAIT_FOR_OUTCOME (2)
The IBM Data Server Driver for JDBC and SQLJ requests that:
  • Read transactions wait for a commit or rollback operation when they encounter data that is being updated or deleted.
  • Read transactions do not skip rows that are being inserted.
DB2BaseDataSource.CONCURRENTACCESS_NOT_SET (0)
Enables the data server's default behavior for read transactions when lock contention occurs. This is the default value.
currentDegree
Specifies the degree of parallelism for the execution of queries that are dynamically prepared. The type of this property is String. The currentDegree value is used to set the CURRENT DEGREE special register on the data source. If currentDegree is not set, no value is passed to the data source.
currentExplainMode
Specifies the value for the CURRENT EXPLAIN MODE special register. The CURRENT EXPLAIN MODE special register enables and disables the Explain facility. The data type of this property is String. The maximum length is 254 bytes. This property applies only to connections to data sources that support the CURRENT EXPLAIN MODE special register.
currentFunctionPath
Specifies the SQL path that is used to resolve unqualified data type names and function names in SQL statements that are in JDBC programs. The data type of this property is String. For a Db2 on Linux, UNIX, and Windows systems server, the maximum length is 254 bytes. For a Db2 for z/OS server, the maximum length is 2048 bytes. The value is a comma-separated list of schema names. Those names can be ordinary or delimited identifiers.
currentMaintainedTableTypesForOptimization
Specifies a value that identifies the types of objects that can be considered when the data source optimizes the processing of dynamic SQL queries. This register contains a keyword representing table types. The data type of this property is String.

Possible values of currentMaintainedTableTypesForOptimization are:

ALL
Indicates that all materialized query tables will be considered.
NONE
Indicates that no materialized query tables will be considered.
SYSTEM
Indicates that only system-maintained materialized query tables that are refresh deferred will be considered.
USER
Indicates that only user-maintained materialized query tables that are refresh deferred will be considered.
currentPackagePath
Specifies a comma-separated list of collections on the server. The database server searches these collections for JDBC and SQLJ packages.

The precedence rules for the currentPackagePath and currentPackageSet properties follow the precedence rules for the CURRENT PACKAGESET and CURRENT PACKAGE PATH special registers.

currentPackageSet
Specifies the collection ID to search for JDBC and SQLJ packages. The data type of this property is String. The default is NULLID for IBM Data Server Driver for JDBC and SQLJ type 4 connectivity. For IBM Data Server Driver for JDBC and SQLJ type 2 connectivity, if a value for currentPackageSet is not specified, the property value is not set. If currentPackageSet is set, its value overrides the value of jdbcCollection.

Multiple instances of the IBM Data Server Driver for JDBC and SQLJ can be installed at a database server by running the DB2Binder utility multiple times. The DB2binder utility includes a -collection option that lets the installer specify the collection ID for each IBM Data Server Driver for JDBC and SQLJ instance. To choose an instance of the IBM Data Server Driver for JDBC and SQLJ for a connection, you specify a currentPackageSet value that matches the collection ID for one of the IBM Data Server Driver for JDBC and SQLJ instances.

The precedence rules for the currentPackagePath and currentPackageSet properties follow the precedence rules for the CURRENT PACKAGESET and CURRENT PACKAGE PATH special registers.

currentRefreshAge
Specifies a timestamp duration value that is the maximum duration since a REFRESH TABLE statement was processed on a system-maintained REFRESH DEFERRED materialized query table such that the materialized query table can be used to optimize the processing of a query. This property affects dynamic statement cache matching. The data type of this property is long.
currentSchema
Specifies the default schema name that is used to qualify unqualified database objects in dynamically prepared SQL statements. The value of this property sets the value in the CURRENT SCHEMA special register on the database server. The schema name is case-sensitive, and must be specified in uppercase characters.
cursorSensitivity
Specifies whether the java.sql.ResultSet.TYPE_SCROLL_SENSITIVE value for a JDBC ResultSet maps to the SENSITIVE DYNAMIC attribute, the SENSITIVE STATIC attribute, or the ASENSITIVE attribute for the underlying database cursor. The data type of this property is int. Possible values are TYPE_SCROLL_SENSITIVE_STATIC (0), TYPE_SCROLL_SENSITIVE_DYNAMIC (1), or TYPE_SCROLL_ASENSITIVE (2). The default is TYPE_SCROLL_SENSITIVE_STATIC.

If the data source does not support sensitive dynamic scrollable cursors, and TYPE_SCROLL_SENSITIVE_DYNAMIC is requested, the JDBC driver accumulates a warning and maps the sensitivity to SENSITIVE STATIC. For Db2 for IBM i database servers, which do not support sensitive static cursors, java.sql.ResultSet.TYPE_SCROLL_SENSITIVE always maps to SENSITIVE DYNAMIC.

dateFormat
Specifies:
  • The format in which the String argument of the PreparedStatement.setString method against a DATE column must be specified.
  • The format in which the result of the ResultSet.getString or CallableStatement.getString method against a DATE column is returned.
The data type of dateFormat is int.
Possible values of dateFormat are:
Constant Integer value Format
com.ibm.db2.jcc.DB2BaseDataSource.ISO 1 yyyy-mm-dd
com.ibm.db2.jcc.DB2BaseDataSource.USA 2 mm/dd/yyyy
com.ibm.db2.jcc.DB2BaseDataSource.EUR 3 dd.mm.yyyy
com.ibm.db2.jcc.DB2BaseDataSource.JIS 4 yyyy-mm-dd
The default is com.ibm.db2.jcc.DB2BaseDataSource.ISO.
decimalRoundingMode
Specifies the rounding mode for assignment to decimal floating-point variables or DECFLOAT columns on Db2 for z/OS or Db2 on Linux, UNIX, and Windows systems data servers.

Possible values are:

DB2BaseDataSource.ROUND_DOWN (1)
Rounds the value towards 0 (truncation). The discarded digits are ignored.
DB2BaseDataSource.ROUND_CEILING (2)
Rounds the value towards positive infinity. If all of the discarded digits are zero or if the sign is negative the result is unchanged other than the removal of the discarded digits. Otherwise, the result coefficient is incremented by 1.
DB2BaseDataSource.ROUND_HALF_EVEN (3)
Rounds the value to the nearest value; if the values are equidistant, rounds the value so that the final digit is even. If the discarded digits represents greater than half (0.5) of the value of one in the next left position then the result coefficient is incremented by 1. If they represent less than half, then the result coefficient is not adjusted (that is, the discarded digits are ignored). Otherwise the result coefficient is unaltered if its rightmost digit is even, or is incremented by 1 if its rightmost digit is odd (to make an even digit).
DB2BaseDataSource.ROUND_HALF_UP (4)
Rounds the value to the nearest value; if the values are equidistant, rounds the value away from zero. If the discarded digits represent greater than or equal to half (0.5) of the value of one in the next left position then the result coefficient is incremented by 1. Otherwise the discarded digits are ignored.
DB2BaseDataSource.ROUND_FLOOR (6)
Rounds the value towards negative infinity. If all of the discarded digits are zero or if the sign is positive the result is unchanged other than the removal of discarded digits. Otherwise, the sign is negative and the result coefficient is incremented by 1.
DB2BaseDataSource.ROUND_UNSET (-2147483647)
No rounding mode was explicitly set. The IBM Data Server Driver for JDBC and SQLJ does not use the decimalRoundingMode to set the rounding mode on the data server. The rounding mode is ROUND_HALF_EVEN.

If you explicitly set the decimalRoundingMode value, that value updates the CURRENT DECFLOAT ROUNDING MODE special register value on a Db2 for z/OS data server.

If you explicitly set the decimalRoundingMode value, that value does not update the CURRENT DECFLOAT ROUNDING MODE special register value on a Db2 on Linux, UNIX, and Windows systems data server. If the value to which you set decimalRoundingMode is not the same as the value of the CURRENT DECFLOAT ROUNDING MODE special register, an Exception is thrown. To change the data server value, you need to set that value with the decflt_rounding database configuration parameter.

decimalRoundingMode does not affect decimal value assignments. The IBM Data Server Driver for JDBC and SQLJ always rounds decimal values down.

enableExtendedDescribe
Specifies whether the IBM Data Server Driver for JDBC and SQLJ requests extended describe information from the data server when it prepares a statement.

Extended describe information provides:

  • Additional descriptive information for a cursor or a result set
  • Information about whether a column:
    • Can be updated
    • Is a primary key or a preferred candidate key member
    • Is an expression or a table column
    • is a generated column or a table column
  • The fully qualified view or table name
  • The fully qualified column name

Possible values are:

DB2BaseDataSource.NOT_SET (0)
The IBM Data Server Driver for JDBC and SQLJ requests extended describe information. This is the default.
DB2BaseDataSource.YES (1)
The IBM Data Server Driver for JDBC and SQLJ requests extended describe information.
DB2BaseDataSource.NO (2)
The IBM Data Server Driver for JDBC and SQLJ does not request extended describe information.

Setting enableExtendedDescribe to DB2BaseDataSource.NO can result in a performance benefit because it avoids the extra processing that the driver must do to provide the additional information. However, if you specify this is option, some methods throw an exception or return unexpected results. The following table lists the behavior of methods when enableExtendedDescribe is set to DB2BaseDataSource.NO.

Method Result when extended describe is off
Connection.findAutoGeneratedKeysColumn Returns an array of empty strings ("")
DB2ResultSetMetaData.getDBTemporalColumnType Returns -1
ResultSet.getMetaData on the ResultSet object that is returned by PreparedStatement.getGeneratedKeys Returns null
ResultSet.insertRow, ResultSet.deleteRow, ResultSet.updateRow SQLException with error code -4474, SQLSTATE 42808 (column not updatable)
ResultSet.updateXXX methods SQLException with error code -4474, SQLSTATE 42808 (column not updatable)
ResultSetMetaData.getTableName, ResultSetMetaData.getSchemaName, ResultSetMetaData.getColumnName Returns an empty string ("")
ResultSetMetaData.isAutoIncrement Returns false
enableExtendedIndicators
Specifies whether support for extended indicators is enabled in the IBM Data Server Driver for JDBC and SQLJ. Possible values are:
DB2BaseDataSource.YES (1)
Support for extended indicators is enabled in the IBM Data Server Driver for JDBC and SQLJ.
DB2BaseDataSource.NO (2)
Support for extended indicators is disabled in the IBM Data Server Driver for JDBC and SQLJ.
DB2BaseDataSource.NOT_SET (0)
Support for extended indicators is enabled in the IBM Data Server Driver for JDBC and SQLJ. This is the default value.
enableRowsetSupport
Specifies whether the IBM Data Server Driver for JDBC and SQLJ uses multiple-row FETCH for forward-only cursors or scrollable cursors, if the data server supports multiple-row FETCH. The data type of this property is int.

For connections to Db2 for z/OS, when enableRowsetSupport is set, its value overrides the useRowsetCursor property value.

Possible values are:

DB2BaseDataSource.YES (1)
Specifies that:
  • For IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to Db2 for z/OS, multiple-row FETCH is used for scrollable cursors and forward-only cursors, if the data server supports multiple-row FETCH.
  • For IBM Data Server Driver for JDBC and SQLJ type 4 connectivity, or IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to Db2 on Linux, UNIX, and Windows systems, multiple-row fetch is used for scrollable cursors, if the data server supports multiple-row FETCH.
DB2BaseDataSource.NO (2)
Specifies that multiple-row fetch is not used.
DB2BaseDataSource.NOT_SET (0)
Specifies that if the enableRowsetSupport property is not set:
  • For IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to Db2 for z/OS, multiple-row fetch is not used.
  • For IBM Data Server Driver for JDBC and SQLJ type 4 connectivity to Db2 for z/OS, multiple-row fetch is used if useRowsetCursor is set to true.
  • For connections to Db2 on Linux, UNIX, and Windows systems, multiple row fetch is used for scrollable cursors, if the data server supports multiple-row FETCH.

For IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to Db2 for z/OS, multiple-row fetch is not compatible with progressive streaming. Therefore, if progressive streaming is used for a FETCH operation, multiple-row FETCH is not used.

enableTimeoutOnCursor
For DatabaseMetaData or ResultSet methods that use Statement objects in their implementations, specifies whether the commandTimeout and queryTimeoutInterruptProcessingMode property values control the timeout behavior for those Statement objects.

Examples of methods that use Statement objects in their implementations are:

  • ResultSet.updateRow
  • ResultSet.insertRow
  • ResultSet.deleteRow
  • DatabaseMetaData.getProcedures
  • DatabaseMetaData.getTables
  • DatabaseMetaData.getColumns

The data type of this property is int. The possible values are:

com.ibm.db2.jcc.DB2BaseDataSource.YES (1) or com.ibm.db2.jcc.DB2BaseDataSource.NOT_SET (0)
A Statement object that is used in the implementation of a DatabaseMetaData or ResultSet method is controlled by the commandTimeout and queryTimeoutInterruptProcessingMode properties. This behavior is the default behavior.
com.ibm.db2.jcc.DB2BaseDataSource.NO (2)
A Statement object that is used in the implementation of a DatabaseMetaData or ResultSet method is not controlled by the commandTimeout and queryTimeoutInterruptProcessingMode properties.
encryptionAlgorithm
Specifies whether the IBM Data Server Driver for JDBC and SQLJ uses 56-bit DES (weak) encryption or 256-bit AES (strong) encryption. The data type of this property is int. Possible values are:
1
The driver uses 56-bit DES encryption.

This value is the default, unless configuration property db2.jcc.encryptionAlgorithm provides a different default.

2
The driver uses 256-bit AES encryption, if the database server supports it. 256-bit AES encryption is available for IBM Data Server Driver for JDBC and SQLJ type 4 connectivity only.
For AES encryption, you need an unrestricted policy file for JCE. That file is available at the following location:
https://www.ibm.com/marketing/iwm/iwm/web/preLogin.do?source=jcesdk

encryptionAlgorithm can be specified only if the securityMechanism or db2.jcc.securityMechanism value is ENCRYPTED_PASSWORD_SECURITY (7) or ENCRYPTED_USER_AND_PASSWORD_SECURITY (9).

fullyMaterializeInputStreams
Indicates whether streams are fully materialized before they are sent from the client to a data source. The data type of this property is boolean. The default is false.

If the value of fullyMaterializeInputStreams is true, the JDBC driver fully materialized the streams before sending them to the server.

gssCredential
For a data source that uses Kerberos security, specifies a delegated credential that is passed from another principal. The data type of this property is org.ietf.jgss.GSSCredential. Delegated credentials are used in multi-tier environments, such as when a client connects to WebSphere® Application Server, which, in turn, connects to the data source. You obtain a value for this property from the client, by invoking the GSSContext.getDelegCred method. GSSContext is part of the IBM Java Generic Security Service (GSS) API. If you set this property, you also need to set the Mechanism and KerberosServerPrincipal properties.

This property is applicable only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.

For more information on using Kerberos security with the IBM Data Server Driver for JDBC and SQLJ, see "Using Kerberos security under the IBM Data Server Driver for JDBC and SQLJ".

kerberosServerPrincipal
For a data source that uses Kerberos security, specifies the name that is used for the data source when it is registered with the Kerberos Key Distribution Center (KDC). The data type of this property is String.

This property is applicable only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.

pdqProperties
Specifies properties that control the interaction between the IBM Data Server Driver for JDBC and SQLJ and the client optimization feature of pureQuery®.

The data type of this property is String.

Set the pdqProperties property only if you are using the client optimization feature of pureQuery. See the Integrated Data Management Information Center for information about valid values for pdqProperties.

queryPrefetch
Specifies whether the IBM Data Server Driver for JDBC and SQLJ uses query prefetch behavior for retrieving rows from a Db2 table. Use of query prefetch can improve performance when an application retrieves large result sets. Query prefetch is not used when an application retrieves LOB or XML data, or when the cursor that is used for data retrieval is not a forward-only cursor.

The data type of queryPrefetch is boolean. This property applies only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.

Possible values are:

true
Specifies that the IBM Data Server Driver for JDBC and SQLJ can use query prefetch when it retrieves rows from a table.
false
Specifies that the IBM Data Server Driver for JDBC and SQLJ does not use query prefetch when it retrieves rows from a table. false is the default.
readOnly
Specifies whether the connection is read-only. The data type of this property is boolean. The default is false.
resultSetHoldabilityForCatalogQueries
Specifies whether cursors for queries that are executed on behalf of DatabaseMetaData methods remain open after a commit operation. The data type of this property is int.
When an application executes DatabaseMetaData methods, the IBM Data Server Driver for JDBC and SQLJ executes queries against the catalog of the target data source. By default, the holdability of those cursors is the same as the holdability of application cursors. To use different holdability for catalog queries, use the resultSetHoldabilityForCatalogQueries property. Possible values are:
DB2BaseDataSource.HOLD_CURSORS_OVER_COMMIT (1)
Leave cursors for catalog queries open after a commit operation, regardless of the resultSetHoldability setting.
DB2BaseDataSource.CLOSE_CURSORS_AT_COMMIT (2)
Close cursors for catalog queries after a commit operation, regardless of the resultSetHoldability setting.
DB2BaseDataSource.NOT_SET (0)
Use the resultSetHoldability setting for catalog queries. This is the default value.
returnAlias
Specifies whether the JDBC driver returns rows for table aliases and synonyms for DatabaseMetaData methods that return table information, such as getTables. The data type of returnAlias is int. Possible values are:
0
Do not return rows for aliases or synonyms of tables in output from DatabaseMetaData methods that return table information.
1
For tables that have aliases or synonyms, return rows for aliases and synonyms of those tables, as well as rows for the tables, in output from DatabaseMetaData methods that return table information. This is the default.
sslClientHostnameValidation
Specifies whether the IBM Data Server Driver for JDBC and SQLJ performs client host name validation when establishing a connection to a data server that uses transport layer security (TLS). Host name validation is performed according to the standard that is specified in IETF RFC 6125.
sslClientHostnameValidation can have one of the following values:
BASIC
Specifies that host name validation is enabled. During the TLS handshake, when the data server sends its certificate to the driver, the driver checks whether the host name or its corresponding IP address in the certificate matches the host name or corresponding IP address that the application provides to the driver.
OFF
Specifies that host name validation is disabled. This is the default.

This property applies only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity to Db2 for z/OS and to Db2 on Linux, UNIX, and Windows systems .

statementConcentrator
Specifies whether the IBM Data Server Driver for JDBC and SQLJ uses the data source's statement concentrator functionality. The statement concentrator is the ability to bypass preparation of a statement when it is the same as a statement in the dynamic statement cache, except for literal values. Statement concentrator functionality applies only to SQL statements that have literals but no parameter markers. Possible values are:
DB2BaseDataSource.STATEMENT_CONCENTRATOR_OFF (1)
The IBM Data Server Driver for JDBC and SQLJ does not use the data source's statement concentrator functionality.
DB2BaseDataSource.STATEMENT_CONCENTRATOR_WITH_LITERALS (2)
The IBM Data Server Driver for JDBC and SQLJ uses the data source's statement concentrator functionality.
DB2BaseDataSource.STATEMENT_CONCENTRATOR_NOT_SET (0)
Enables the data server's default behavior for statement concentrator functionality. This is the default value.

For Db2 on Linux, UNIX, and Windows systems data sources that support statement concentrator functionality, the functionality is used if the STMT_CONC configuration parameter is set to ON at the data source. Otherwise, statement concentrator functionality is not used.

For Db2 for z/OS data sources that support statement concentrator functionality, the functionality is not used if statementConcentrator is not set.

streamBufferSize
Specifies the size, in bytes, of the JDBC driver buffers for chunking LOB or XML data. The JDBC driver uses the streamBufferSize value whether or not it uses progressive streaming. The data type of streamBufferSize is int. The default is 1048576.

If the JDBC driver uses progressive streaming, LOB or XML data is materialized if it fits in the buffers, and the driver does not use the fullyMaterializeLobData property.

Db2 for z/OS Version 9.1 and later supports progressive streaming for LOBs and XML objects. Db2 on Linux, UNIX, and Windows systems Version 9.5 and later, and IBM Informix® Version 11.50 and later support progressive streaming for LOBs.

supportsAsynchronousXARollback
Specifies whether the IBM Data Server Driver for JDBC and SQLJ supports asynchronous XA rollback operations. The data type of this property is int. The default is DB2BaseDataSource.NO (2). If the application runs against a BEA WebLogic Server application server, set supportsAsynchronousXARollback to DB2BaseDataSource.YES (1).
sysSchema
Specifies the schema of the shadow catalog tables or views that are searched when an application invokes a DatabaseMetaData method. The sysSchema property was formerly called cliSchema.
timeFormat
Specifies:
  • The format in which the String argument of the PreparedStatement.setString method against a TIME column must be specified.
  • The format in which the result of the ResultSet.getString or CallableStatement.getString method against a TIME column is returned.
The data type of timeFormat is int.
Possible values of timeFormat are:
Constant Integer value Format
com.ibm.db2.jcc.DB2BaseDataSource.ISO 1 hh:mm:ss
com.ibm.db2.jcc.DB2BaseDataSource.USA 2 hh:mm am or hh:mm pm
com.ibm.db2.jcc.DB2BaseDataSource.EUR 3 hh.mm.ss
com.ibm.db2.jcc.DB2BaseDataSource.JIS 4 hh:mm:ss
The default is com.ibm.db2.jcc.DB2BaseDataSource.ISO.
timestampOutputType
Specifies whether the IBM Data Server Driver for JDBC and SQLJ returns a java.sql.Timestamp object or a com.ibm.db2.jcc.DBTimestamp when the standard JDBC interfaces ResultSet.getTimestamp, CallableStatement.getTimestamp, ResultSet.getObject, or CallableStatement.getObject are called to return timestamp information.

Possible values are:

DB2BaseDataSource.JDBC_TIMESTAMP (1)
The IBM Data Server Driver for JDBC and SQLJ returns java.sql.Timestamp objects from ResultSet.getTimestamp, CallableStatement.getTimestamp, ResultSet.getObject, or CallableStatement.getObject calls.
DB2BaseDataSource.JCC_DBTIMESTAMP (2)
The IBM Data Server Driver for JDBC and SQLJ returns com.ibm.db2.jcc.DBTimestamp objects from ResultSet.getTimestamp, CallableStatement.getTimestamp, ResultSet.getObject, or CallableStatement.getObject calls.
DB2BaseDataSource.NOT_SET (0)
This is the default behavior.

The behavior is the same as the behavior for DB2BaseDataSource.JDBC_TIMESTAMP.

useCachedCursor
Specifies whether the underlying cursor for PreparedStatement objects is cached and reused on subsequent executions of a PreparedStatement object. The data type of useCachedCursor is boolean.

If useCachedCursor is set to true, the cursor for PreparedStatement objects is cached, which can improve performance.

Set useCachedCursor to false if PreparedStatement objects access tables whose column types or lengths change between executions of those PreparedStatement objects.

The default for useCachedCursor is:

  • false, if the data server is Db2 on Linux, UNIX, and Windows systems, and the driver is at one of the following levels:
    • Version 3.67 or 4.17, or later
    • Version 3.64
  • true, if the data server and driver version are one of the following combinations:
    • For a Db2 for z/OS data server, any version of the driver other than the versions for which useCachedCursor is false

If the driver version is 3.67 or 4.17, or later, or 3.64 , and the deferPrepares property is set to true, the driver behaves as if useCachedCursor is set to false, regardless of the useCachedCursor setting.

The useCachedCursor property is deprecated in version 3.69 or 4.19 of the driver. You can achieve better performance when the property is not set by the application. If you need the older driver behavior, explicitly set the property to true or false.

useClientSideLicenseFirst
Specifies whether the IBM Data Server Driver for JDBC and SQLJ checks the client-side license before the server-side license for permission to access the data server.
useClientSideLicenseFirst can have one of the following values:
DB2BaseDataSource.YES (1)
1
Check whether a client-side license exists, and if so, use it to validate the connection. If a client-side license does not exist, check for a server-side license. If neither license exists, the driver throws a LicenseException.
DB2BaseDataSource.NO (2) or DB2BaseDataSource.NOT_SET (0)
Check whether a server-side license exists, and if so, use it to validate the connection. If a server-side license does not exist, check for a client-side license. If neither license exists, the driver throws a LicenseException. This is the default behavior.

useClientSideLicenseFirst applies to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity to Db2 for z/OS, Db2 for IBM i, and Db2 on Cloud, and to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity on Db2 for z/OS.

useIdentityValLocalForAutoGeneratedKeys
Specifies whether the IBM Data Server Driver for JDBC and SQLJ uses only the SQL built-in function IDENTITY_VAL_LOCAL to determine automatically generated key values. The data type of this property is boolean. Possible values are:
true
Specifies that the IBM Data Server Driver for JDBC and SQLJ always uses the SQL built-in function IDENTITY_VAL_LOCAL to determine automatically generated key values. The driver uses IDENTITY_VAL_LOCAL even if it is possible to use SELECT FROM INSERT.

Specify true if the target data server supports SELECT FROM INSERT, but the target objects do not. For example, SELECT FROM INSERT is not valid for a table on which a trigger is defined.

false
Specifies that the IBM Data Server Driver for JDBC and SQLJ determines whether to use SELECT FROM INSERT or IDENTITY_VAL_LOCAL to determine automatically generated keys. false is the default.
useJDBC4ColumnNameAndLabelSemantics
Specifies how the IBM Data Server Driver for JDBC and SQLJ handles column labels in ResultSetMetaData.getColumnName, ResultSetMetaData.getColumnLabel, and ResultSet.findColumn method calls.

Possible values are:

DB2BaseDataSource.YES (1)
The IBM Data Server Driver for JDBC and SQLJ uses the following rules, which conform to the JDBC 4.0 specification, to determine the value that ResultSetMetaData.getColumnName, ResultSetMetaData.getColumnLabel, and ResultSet.findColumn return:
  • The column name that is returned by ResultSetMetaData.getColumnName is its name from the database.
  • The column label that is returned by ResultSetMetaData.getColumnLabel is the label that is specified with the SQL AS clause. If the SQL AS clause is not specified, the label is the name of the column.
  • ResultSet.findColumn takes the label for the column, as specified with the SQL AS clause, as input. If the SQL AS clause was not specified, the label is the column name.
  • The IBM Data Server Driver for JDBC and SQLJ does not use a column label that is assigned by the SQL LABEL ON statement.
These rules apply to IBM Data Server Driver for JDBC and SQLJ version 3.50 and later, for connections to the following database systems:
  • Db2 for z/OS Version 8 or later
  • Db2 on Linux, UNIX, and Windows systems Version 8.1 or later
  • Db2 for IBM i V5R3 or later

For earlier versions of the driver or the database systems, the rules for a useJDBC4ColumnNameAndLabelSemantics value of DB2BaseDataSource.NO apply, even if useJDBC4ColumnNameAndLabelSemantics is set to DB2BaseDataSource.YES.

DB2BaseDataSource.NO (2)
The IBM Data Server Driver for JDBC and SQLJ uses the following rules to determine the values that ResultSetMetaData.getColumnName, ResultSetMetaData.getColumnLabel, and ResultSet.findColumn return:
If the data source does not support the LABEL ON statement, or the source column is not defined with the LABEL ON statement:
  • The value that is returned by ResultSetMetaData.getColumnName is its name from the database, if no SQL AS clause is specified. If the SQL AS clause is specified, the value that is returned is the column label.
  • The value that is returned by ResultSetMetaData.getColumnLabel is the label that is specified with the SQL AS clause. If the SQL AS clause is not specified, the value that is returned is the name of the column.
  • ResultSet.findColumn takes the column name as input.
If the source column is defined with the LABEL ON statement:
  • The value that is returned by ResultSetMetaData.getColumnName is the column name from the database, if no SQL AS clause is specified. If the SQL AS clause is specified, the value that is returned is the column label that is specified in the AS clause.
  • The value that is returned by ResultSetMetaData.getColumnLabel is the label that is specified in the LABEL ON statement.
  • ResultSet.findColumn takes the column name as input.

These rules conform to the behavior of the IBM Data Server Driver for JDBC and SQLJ before Version 3.50.

DB2BaseDataSource.NOT_SET (0)
This is the default behavior.

For the IBM Data Server Driver for JDBC and SQLJ version 3.50 and earlier, the default behavior for useJDBC4ColumnNameAndLabelSemantics is the same as the behavior for DB2BaseDataSource.NO.

For the IBM Data Server Driver for JDBC and SQLJ version 4.0 and later:
  • The default behavior for useJDBC4ColumnNameAndLabelSemantics is the same as the behavior for DB2BaseDataSource.YES, for connections to the following database systems:
    • Db2 for z/OS Version 8 or later
    • Db2 on Linux, UNIX, and Windows systems Version 8.1 or later
    • Db2 for IBM i V5R3 or later
  • For connections to earlier versions of these database systems, the default behavior for useJDBC4ColumnNameAndLabelSemantics is DB2BaseDataSource.NO.
xmlFormat
Specifies the format that is used to retrieve XML data from the data server. The XML format cannot be modified after a connection is established. Possible values are:
com.ibm.db2.jcc.DB2BaseDataSource.XML_FORMAT_NOT_SET (-Integer.MAX_VALUE)
Specifies that the default XML format is used. The default is textual XML format.
com.ibm.db2.jcc.DB2BaseDataSource.XML_FORMAT_TEXTUAL (0)
Specifies that the XML textual format is used.
com.ibm.db2.jcc.DB2BaseDataSource.XML_FORMAT_BINARY (1)
Specifies that the binary XML format is used.

When binary XML is used, the XML data that is passed to the IBM Data Server Driver for JDBC and SQLJ cannot refer to external entities, internal entities, or internal DTDs. External DTDs are supported only if those DTDs were previously registered in the data source.

com.ibm.db2.jcc.DB2ConnectionPoolDataSource.maxStatements
Controls an internal statement cache that is associated with a PooledConnection. The data type of this property is int. Possible values are:
positive integer
Enables the internal statement cache for a PooledConnection, and specifies the number of statements that the IBM Data Server Driver for JDBC and SQLJ keeps open in the cache.
0 or negative integer
Disables internal statement caching for the PooledConnection. 0 is the default.

maxStatements controls the internal statement cache that is associated with a PooledConnection only when the PooledConnection object is created. maxStatements has no effect on caching in an already existing PooledConnection object.

maxStatements applies only to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity on Db2 for z/OS, and toIBM Data Server Driver for JDBC and SQLJ type 4 connectivity.

com.ibm.db2.jcc.DB2ConnectionPool.acquireIncrement
Specifies the number of new connections that are to be acquired when all connections in a connection pool are exhausted. The data type of this property is int. The default is 1.
com.ibm.db2.jcc.DB2ConnectionPool.acquireRetryAttempts
For a new connection, specifies the number of retries that are to be performed if the initial connection attempt fails. The data type of this property is int. The default is 1 retry.
com.ibm.db2.jcc.DB2ConnectionPool.acquireRetryDelay
For a new connection, specifies the amount of time in seconds to wait between retries if the initial connection attempt fails. The data type of this property is int. The default is 1.
com.ibm.db2.jcc.DB2ConnectionPool.autoCommit
Specifies whether autocommit is enabled for all SQL update operations during the existence of a pooled connection. The data type of this property is Boolean. Possible values are:
true
Autocommit is enabled during the existence of the pooled connection.
false
Autocommit is disabled during the existence of the pooled connection. false is the default.
com.ibm.db2.jcc.DB2ConnectionPool.connectionTimeout
Specifies the amount of time in seconds to wait for a pooled connection to open. The data type of this property is int. The default is 0, which means that there is no time limit.
com.ibm.db2.jcc.DB2ConnectionPool.databaseName
Specifies the name of the data server. This name is the database portion of the connection URL. The data type of this property is String. The default is the local site.
com.ibm.db2.jcc.DB2ConnectionPool.driverType
Specifies the type of IBM Data Server Driver for JDBC and SQLJ connectivity to the data server. Possible values are 2 or 4. The data type of this property is int. The default is 2.
com.ibm.db2.jcc.DB2ConnectionPool.initialPoolSize
Specifies the number of connections that should be created initially in the connection pool. The data type of this property is int.
com.ibm.db2.jcc.DB2ConnectionPool.loginTimeout
Specifies the maximum time in seconds to wait for a pooled connection to a data server. After the number of seconds that are specified by loginTimeout have elapsed, the driver closes the connection to the data server. The data type of this property is int. The default is 0. A value of 0 means that the timeout value is the default system timeout value.
com.ibm.db2.jcc.DB2ConnectionPool.logWriter
Specifies the character output stream to which all logging and trace messages for the DB2Pool object are printed. The data type of this property is java.io.PrinterWriter. The default value is null, which means that no logging or tracing for the DB2ConnectionPool object is done.
com.ibm.db2.jcc.DB2ConnectionPool.maxIdleTime
Specifies how many seconds connections in the connection pool remain unused before they are released. The data type of this property is int.
com.ibm.db2.jcc.DB2ConnectionPool.maxPoolSize
Specifies the maximum number of connections in the connection pool. The data type of this property is int. The default value is no maximum.
com.ibm.db2.jcc.DB2ConnectionPool.password
Specifies the password for the DB2ConnectionPool object. The data type of this property is String.
com.ibm.db2.jcc.DB2ConnectionPool.poolLoggingFrequency
Specifies how often, in seconds, trace data from the connection pool is written to the log. The data type of this property is int. The default is 0, which means that trace data is not written to the log.
com.ibm.db2.jcc.DB2ConnectionPool.portNumber
Specifies the TCP/IP server port number that is assigned to the data server to which the application is connecting. The data type of this property is int. The value can be any integer greater than or equal to 0 and less than or equal to 65535. The default is 446.
com.ibm.db2.jcc.DB2ConnectionPool.preferredTestQuery
Specifies an SQL query that is used to test pooled connections for connectivity to the data server. The data type of this property is String. The default is 'SELECT CURRENT DATE FROM SYSIBM.SYSDUMMY1'.
com.ibm.db2.jcc.DB2ConnectionPool.serverName
Specifies the domain name or IP address of the data server to which the application is connecting. The data type of this property is String. There is no default.
com.ibm.db2.jcc.DB2ConnectionPool.testConnectionOnCheckin
Specifies whether to enable automatic connection checking when an application releases its connection to the connection pool. The data type of this property is Boolean. Possible values are:
true
Automatic connection checking is enabled.
false
Automatic connection checking is disabled. false is the default.
com.ibm.db2.jcc.DB2ConnectionPool.testConnectionOnCheckout
Specifies whether to enable automatic connection checking when an application obtains its connection to the connection pool. The data type of this property is Boolean. Possible values are:
true
Automatic connection checking is enabled.
false
Automatic connection checking is disabled. false is the default.
com.ibm.db2.jcc.DB2ConnectionPool.traceFile
Specifies the name of a file into which the IBM Data Server Driver for JDBC and SQLJ writes trace information. The data type of this property is String. The traceFile property is an alternative to the logWriter property for directing the output trace stream to a file.
com.ibm.db2.jcc.DB2ConnectionPool.traceLevel
Specifies what to trace.
You can specify one or more of the following traces with the traceLevel parameter:
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_NONE (X'00')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_CONNECTION_CALLS (X'01')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_STATEMENT_CALLS (X'02')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_RESULT_SET_CALLS (X'04')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_DRIVER_CONFIGURATION (X'10')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_CONNECTS (X'20')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_DRDA_FLOWS (X'40')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_RESULT_SET_META_DATA (X'80')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_PARAMETER_META_DATA (X'100')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_DIAGNOSTICS (X'200')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_SQLJ (X'400®')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_XA_CALLS (IBM Data Server Driver for JDBC and SQLJ type 2 connectivity for Db2 on Linux, UNIX, and Windows systems only) (X'800')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_META_CALLS (X'2000')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_DATASOURCE_CALLS (X'4000')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_LARGE_OBJECT_CALLS (X'8000')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_T2ZOS (X'10000')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_SYSTEM_MONITOR (X'20000')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_TRACEPOINTS (X'40000')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_SYSPLEX (X'80000')
  • com.ibm.db2.jcc.DB2BaseDataSource.TRACE_ALL (X'FFFFFFFF')
To specify more than one trace, use one of these techniques:
  • Use bitwise OR (|) operators with two or more trace values. For example, to trace DRDA flows and connection calls, specify this value for traceLevel:
    TRACE_DRDA_FLOWS|TRACE_CONNECTION_CALLS
  • Use a bitwise complement (tilde (~)) operator with a trace value to specify all except a certain trace. For example, to trace everything except DRDA flows, specify this value for traceLevel:
     ~TRACE_DRDA_FLOWS
com.ibm.db2.jcc.DB2ConnectionPool.user
The user ID to use for establishing connections. The data type of this property is String.