DB2 10.5 for Linux, UNIX, and Windows

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® for z/OS® and DB2 for Linux, UNIX, and Windows 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 for Linux, UNIX, and Windows 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 for Linux, UNIX, and Windows 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. 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 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 for Linux, UNIX, and Windows 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 for Linux, UNIX, and Windows 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 for Linux, UNIX, and Windows, 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 for Linux, UNIX, and Windows, 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.

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. For the IBM SDK for Java, the file is available at the following location:
https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=jcesdk
The SDK for Java from Oracle might support AES encryption, but not DES encryption. When you use AES encryption with the SDK for Java from Oracle, the JCE Unlimited Strength Jurisdiction Policy File needs to be installed. That file is available from Oracle. If the JCE Unlimited Strength Jurisdiction Policy File is not found, a java.security.InvalidKeyException is thrown.

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.

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.
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 for Linux, UNIX, and Windows 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 for Linux, UNIX, and Windows 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 for Linux, UNIX, and Windows, and the driver is at one of the following levels:
    • Version 3.67 or 4.17, or later
    • Version 3.64 or 4.14
  • 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 or 4.14, and the deferPrepares property is set to true, the driver behaves as if useCachedCursor is set to false, regardless of the useCachedCursor setting.

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 for Linux, UNIX, and Windows Version 8.1 or later
  • DB2 UDB for iSeries® 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 for Linux, UNIX, and Windows Version 8.1 or later
    • DB2 UDB for iSeries 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.