- affinityFailbackInterval
- Specifies the length of the interval, in seconds, that the IBM Data Server Driver for JDBC and SQLJ waits
between attempts to fail back an existing connection to the primary
server. A value that is less than or equal to 0 means that the connection
does not fail back. The default is DB2BaseDataSource.NOT_SET (0).
Attempts to fail back connections to the primary server are made
at transaction boundaries, after the specified interval elapses.
affinityFailbackInterval
is used only if the values of properties enableSeamlessFailover and
enableClientAffinitiesList are DB2BaseDataSource.YES (1).
affinityFailbackInterval
applies only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
- allowNextOnExhaustedResultSet
- Specifies how the IBM Data Server Driver for JDBC and SQLJ handles
a ResultSet.next() call for a forward-only cursor
that is positioned after the last row of the ResultSet.
The data type of this property is int.
Possible values are:
- DB2BaseDataSource.YES (1)
- For a ResultSet that is defined as TYPE_FORWARD_ONLY, ResultSet.next() returns false if
the cursor was previously positioned after the last row of the ResultSet.
false is returned, regardless of whether the cursor
is open or closed.
- DB2BaseDataSource.NO (2)
- For a ResultSet that is defined as TYPE_FORWARD_ONLY,
when ResultSet.next() is called, and the cursor
was previously positioned after the last row of the ResultSet,
the driver throws a java.sql.SQLException with
error text "Invalid operation: result set is closed." This is the
default.
- allowNullResultSetForExecuteQuery
- Specifies whether the IBM Data Server Driver for JDBC and SQLJ returns
null when Statement.executeQuery, PreparedStatement.executeQuery,
or CallableStatement.executeQuery is used to execute
a CALL statement for a stored procedure that does not return any result
sets.
Possible values are:
- DB2BaseDataSource.NOT_SET (0)
- The behavior is the same as for DB2BaseDataSource.NO.
- DB2BaseDataSource.YES (1)
- The IBM Data Server Driver for JDBC and SQLJ returns
null when Statement.executeQuery, PreparedStatement.executeQuery,
or CallableStatement.executeQuery is used to execute
a CALL statement for a stored procedure that does not return any result
sets. This behavior does not conform to the JDBC standard.
- DB2BaseDataSource.NO (2)
- The IBM Data Server Driver for JDBC and SQLJ throws
an SQLException when Statement.executeQuery, PreparedStatement.executeQuery,
or CallableStatement.executeQuery is used to execute
a CALL statement for a stored procedure that does not return any result
sets. This behavior conforms to the JDBC standard.
- atomicMultiRowInsert
- Specifies whether batch operations that use PreparedStatement methods
to modify a table are atomic or non-atomic. The data type of this
property is int.
For
connections to DB2® for z/OS®,
this property applies only to batch INSERT operations.
For connections
to DB2 for Linux, UNIX, and Windows or IBM Informix®,
this property applies to batch INSERT, MERGE, UPDATE or DELETE operations.
Possible
values are:
- DB2BaseDataSource.YES (1)
- Batch operations are atomic. Insertion of all rows in the batch
is considered to be a single operation. If insertion of a single row
fails, the entire operation fails with a BatchUpdateException.
Use of a batch statement that returns auto-generated keys fails with
a BatchUpdateException.
If atomicMultiRowInsert
is set to
DB2BaseDataSource.YES (1):
- Execution of statements in a heterogeneous batch is not allowed.
- If the target data source is DB2 for z/OS the
following operations are not allowed:
- Insertion of more than 32767 rows in a batch results in a BatchUpdateException.
- Calling more than one of the following methods against the same
parameter in different rows results in a BatchUpdateException:
- PreparedStatement.setAsciiStream
- PreparedStatement.setCharacterStream
- PreparedStatement.setUnicodeStream
- DB2BaseDataSource.NO (2)
- Batch inserts are non-atomic. Insertion of each row is considered
to be a separate execution. Information on the success of each insert
operation is provided by the int[] array that is returned by Statement.executeBatch.
- DB2BaseDataSource.NOT_SET (0)
- Batch inserts are non-atomic. Insertion of each row is considered
to be a separate execution. Information on the success of each insert
operation is provided by the int[] array that is returned by Statement.executeBatch.
This is the default.
- blockingReadConnectionTimeout
- The amount of time in seconds before a connection socket read
times out. This property applies only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity,
and affects all requests that are sent to the data source after a
connection is successfully established. The default is 0. A value
of 0 means that there is no timeout.
- clientDebugInfo
- Specifies a value for the CLIENT DEBUGINFO connection attribute,
to notify the data server that stored procedures and user-defined
functions that are using the connection are running in debug mode.
CLIENT DEBUGINFO is used by the DB2 Unified
Debugger. The data type of this property is String. The maximum length
is 254 bytes.
This property applies only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
- clientRerouteAlternateServerName
- Specifies one or more server names for client reroute. The data
type of this property is String.
When enableClientAffinitiesList=DB2BaseDataSource.YES (1),
clientRerouteAlternateServerName must contain the name of the primary
server as well as alternate server names. The server that is identified
by serverName and portNumber is the primary server. That server name
must appear at the beginning of the clientRerouteAlternateServerName
list.
If more than one server name is specified, delimit the
server names with commas (,) or spaces. The number of values that
is specified for clientRerouteAlternateServerName must match the number
of values that is specified for clientRerouteAlternatePortNumber.
clientRerouteAlternateServerName
applies to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to DB2 for Linux, UNIX, and Windows and IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
- clientRerouteAlternatePortNumber
- Specifies one or more port numbers for client reroute. The data
type of this property is String.
When enableClientAffinitiesList=DB2BaseDataSource.YES (1),
clientRerouteAlternatePortNumber must contain the port number for
the primary server as well as port numbers for alternate servers.
The server that is identified by serverName and portNumber is the
primary server. That port number must appear at the beginning of the
clientRerouteAlternatePortNumber list.
If more than one port
number is specified, delimit the port numbers with commas (,) or spaces.
The number of values that is specified for clientRerouteAlternatePortNumber
must match the number of values that is specified for clientRerouteAlternateServerName.
clientRerouteAlternatePortNumber
applies to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to DB2 for Linux, UNIX, and Windows and IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
- clientRerouteServerListJNDIName
- Identifies a JNDI reference to a DB2ClientRerouteServerList instance
in a JNDI repository of reroute server information. clientRerouteServerListJNDIName
applies only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity,
and to connections that are established through the DataSource interface.
If
the value of clientRerouteServerListJNDIName is not null, clientRerouteServerListJNDIName
provides the following functions:
- Allows information about reroute servers to persist across JVMs
- Provides an alternate server location if the first connection
to the data source fails
- clientRerouteServerListJNDIContext
- Specifies the JNDI context that is used for binding and lookup
of the DB2ClientRerouteServerList instance. clientRerouteServerListJNDIContext
applies only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity,
and to connections that are established through the DataSource interface.
If
clientRerouteServerListJNDIContext is not set, the IBM Data Server Driver for JDBC and SQLJ creates
an initial context using system properties or the jndi.properties
file.
clientRerouteServerListJNDIContext can be set
only by
using the following method:
public void setClientRerouteServerListJNDIContext(javax.naming.Context registry)
- commandTimeout
- Specifies the maximum time in seconds that an application that
runs under the IBM Data Server Driver for JDBC and SQLJ waits
for SQL operations to complete before the driver throws an SQLException.
The wait time includes time to obtain a transport, perform failover
if needed, send the request, and wait for a response. The data type
of this parameter is int. The default is 0, which means that there
is no timeout.
If
the java.sql.Statement.setQueryTimeout method is
invoked, the query timeout value that is set through Statement.setQueryTimeout overrides
the commandTimeout value.
commandTimeout applies to the execution
of Statement, PreparedStatement,
and CallableStatement methods execute, executeQuery,
and executeUpdate. commandTimeout also applies
to the executeBatch method if property queryTimeoutInterruptProcessingMode
has the value INTERRUPT_PROCESSING_MODE_CLOSE_SOCKET (2).
The
SQL error code that is returned with the SQLException depends
on the data server and the value of property queryTimeoutInterruptProcessingMode:
If configuration property db2.jcc.enableInetAddressGetHostName
is set to true, the following situations might occur:
- Actual wait times might exceed the commandTimeout value. This
situation can occur when the driver needs to do several DNS lookup
operations to resolve IP addresses to host names. The amount by which
the wait time exceeds the commandTimeout value depends on the number
of DNS lookup operations, and the amount of time that each DNS lookup
operation takes.
- The extra time that is required for DNS lookup operations might
cause more timeout conditions than if db2.jcc.enableInetAddressGetHostName
is set to false.
- connectionCloseWithInFlightTransaction
- Specifies whether the IBM Data Server Driver for JDBC and SQLJ throws
an SQLException or rolls back a transaction without
throwing an SQLException when a connection is closed
in the middle of the transaction. Possible values are:
- DB2BaseDataSource.NOT_SET (0)
- The behavior is the same as for DB2BaseDataSource.CONNECTION_CLOSE_WITH_EXCEPTION.
- DB2BaseDataSource.CONNECTION_CLOSE_WITH_EXCEPTION (1)
- When a connection is closed in the middle of a transaction, an SQLException with
error -4471 is thrown.
- DB2BaseDataSource.CONNECTION_CLOSE_WITH_ROLLBACK (2)
- When a connection is closed in the middle of a transaction, the
transaction is rolled back, and no SQLException is
thrown.
- DB2BaseDataSource.CONNECTION_CLOSE_WITH_COMMIT (3)
- When a connection is closed in the middle of a transaction, the
transaction is committed, and no SQLException is
thrown. Use this option only when migrating applications to DB2.
- connectionTimeout
- Specifies the maximum time in seconds that the IBM Data Server Driver for JDBC and SQLJ waits
for a reply from a group of data servers when the driver attempts
to establish a connection. If the driver does not receive a reply
after the amount of time that is specified by connectionTimeout, the
driver throws an SQLException with SQL error code
-4499. The data type of this parameter is int. The default value is
0.
If
connectionTimeout is set to a positive value, that value overrides
any other timeout values that are set on a connection, such as loginTimeout.
A connection is attempted to the member of the group of data servers
with the greatest load capacity. If none of the members are up, a
connection is attempted to the group IP address that is specified
on the DataSource. If the connection cannot be
established with any of the data servers within the amount of time
that is specified by connectionTimeout, an SQLException is
thrown.
If connectionTimeout is set to 0, and automatic client
reroute is not enabled, there is no time limit.
If connectionTimeout
is set to 0, and automatic client reroute is enabled against a DB2 for z/OS data
sharing group, DB2 pureScale® instance,
or IBM Informix high
availability cluster, automatic client reroute properties such as
maxRetriesForClientReroute and retryIntervalForClientReroute control
the amount of time that is needed to establish the connection.
If
configuration property db2.jcc.enableInetAddressGetHostName is set
to true, the following situations might occur:
- Actual wait times might exceed the connectionTimeout value. This
situation can occur when the driver needs to do several DNS lookup
operations to resolve IP addresses to host names. The amount by which
the wait time exceeds the connectionTimeout value depends on the number
of DNS lookup operations, and the amount of time that each DNS lookup
operation takes.
- The extra time that is required for DNS lookup operations might
cause more timeout conditions than if db2.jcc.enableInetAddressGetHostName
is set to false.
- databaseName
- Specifies the name for the data source. This name is used as the database portion
of the connection URL. The name depends on whether IBM Data Server Driver for JDBC and SQLJ type 4 connectivity or IBM Data Server Driver for JDBC and SQLJ type 2 connectivity is
used.
For
IBM Data Server Driver for JDBC and SQLJ type 4 connectivity:
If this property is not set, connections are made to the local
site.
For
IBM Data Server Driver for JDBC and SQLJ type 2 connectivity:
- The databaseName value is the database name that
is defined during installation, if the value of the serverName connection
property is null. If the value of serverName property is not null,
the databaseName value is a database alias.
- decimalSeparator
- Specifies the decimal separator for input and output, for decimal,
floating point, or decimal floating-point data values. The data type
of this property is int.
If the value of the sendDataAsIs property
is true, decimalSeparator affects only output values.
Possible
values are:
- DB2BaseDataSource.DECIMAL_SEPARATOR_NOT_SET (0)
- A period is used as the decimal separator. This is the default.
- DB2BaseDataSource.DECIMAL_SEPARATOR_PERIOD (1)
- A period is used as the decimal separator.
- DB2BaseDataSource.DECIMAL_SEPARATOR_COMMA (2)
- A comma is used as the decimal separator.
When DECIMAL_SEPARATOR_COMMA
is set, the result of ResultSet.getString on a
decimal, floating point, or decimal floating-point value has a comma
as a separator. However, if the toString method
is executed on a value that is retrieved with a ResultSet.getXXX method
that returns a decimal, floating point, or decimal floating-point
value, the result has a decimal point as the decimal separator.
- decimalStringFormat
- Specifies the string format for data that is retrieved from a
DECIMAL or DECFLOAT column when the SDK for Java™ is Version 1.5 or later. The data type
of this property is int. Possible values are:
- DB2BaseDataSource.DECIMAL_STRING_FORMAT_NOT_SET (0)
- The IBM Data Server Driver for JDBC and SQLJ returns
decimal values in the format that the java.math.BigDecimal.toString method
returns them. This is the default.
For example, the value 0.0000000004
is returned as 4E-10.
- DB2BaseDataSource.DECIMAL_STRING_FORMAT_TO_STRING (1)
- The IBM Data Server Driver for JDBC and SQLJ returns
decimal values in the format that the java.math.BigDecimal.toString method
returns them.
For example, the value 0.0000000004 is returned as
4E-10.
- DB2BaseDataSource.DECIMAL_STRING_FORMAT_TO_PLAIN_STRING (2)
- The IBM Data Server Driver for JDBC and SQLJ returns
decimal values in the format that the java.math.BigDecimal.toPlainString method
returns them.
For example, the value 0.0000000004 is returned as
0.0000000004.
This property has no effect for earlier versions
of the SDK for Java. For those
versions, the IBM Data Server Driver for JDBC and SQLJ returns
decimal values in the format that the java.math.BigDecimal.toString method
returns them.
- defaultIsolationLevel
- Specifies the default transaction isolation level for new connections.
The data type of this property is int. When defaultIsolationLevel
is set on a DataSource, all connections that are
created from that DataSource have the default isolation
level that is specified by defaultIsolationLevel.
For DB2 data sources, the default is java.sql.Connection.TRANSACTION_READ_COMMITTED.
For IBM Informix databases,
the default depends on the type of data source. The following table
shows the defaults.
Table 1. Default isolation levels for IBM Informix databasesType of data source |
Default isolation level |
ANSI-compliant database with logging |
java.sql.Connection.TRANSACTION_SERIALIZABLE |
Database without logging |
java.sql.Connection.TRANSACTION_READ_UNCOMMITTED |
Non-ANSI-compliant database with logging |
java.sql.Connection.TRANSACTION_READ_COMMITTED |
- deferPrepares
- Specifies whether invocation of the Connection.prepareStatement method
results in immediate preparation of an SQL statement on the data source,
or whether statement preparation is deferred until the PreparedStatement.execute method
is executed. The data type of this property is boolean.
deferPrepares
is supported for IBM Data Server Driver for JDBC and SQLJ type 2 connectivity to DB2 for Linux, UNIX, and Windows,
and for IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
Possible
values are:
- true
- Statement preparation on the data source does not occur until
the PreparedStatement.execute method is executed.
This is the default.
- false
- Statement preparation on the data source occurs when the Connection.prepareStatement method
is executed.
Deferring prepare operations can reduce network
delays. However, if you defer prepare operations, you need to ensure
that input data types match table column types.
- description
- A description of the data source. The data type of this property
is String.
- downgradeHoldCursorsUnderXa
- Specifies whether cursors that are defined WITH HOLD can be opened
under XA connections.
downgradeHoldCursorsUnderXa applies to:
- IBM Data Server Driver for JDBC and SQLJ type 4 connectivity to DB2 for z/OS servers.
- 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 servers.
The default is false, which means that
a cursor that is defined WITH HOLD cannot be opened under an XA connection.
An exception is thrown when an attempt is made to open that cursor.
If
downgradeHoldCursorsUnderXa is set to
true, a cursor
that is defined WITH HOLD can be opened under an XA connection. However,
the cursor has the following restrictions:
- When the cursor is opened under an XA connection, the cursor does
not have WITH HOLD behavior. The cursor is closed at XA End.
- A cursor that is open before XA Start on a local transaction is
closed at XA Start.
- driverType
- For the DataSource interface, determines which
driver to use for connections. The data type of this property is int.
Valid values are 2 or 4. 2 is the default.
- enableClientAffinitiesList
- Specifies whether the IBM Data Server Driver for JDBC and SQLJ enables
client affinities for cascaded failover support. The data type of
this property is int. Possible values are:
- DB2BaseDataSource.YES (1)
- The IBM Data Server Driver for JDBC and SQLJ enables
client affinities for cascaded failover support. This means that only
servers that are specified in the clientRerouteAlternateServerName
and clientRerouteAlternatePortNumber properties are retried. The
driver does not attempt to reconnect to any other servers.
For example,
suppose that clientRerouteAlternateServerName contains the following
string:
host1,host2,host3
Also suppose that
clientRerouteAlternatePortNumber contains the following string:port1,port2,port3
When
client affinities are enabled, the retry order is:
- host1:port1
- host2:port2
- host3:port3
- DB2BaseDataSource.NO (2)
- The IBM Data Server Driver for JDBC and SQLJ does
not enable client affinities for cascaded failover support.
- DB2BaseDataSource.NOT_SET (0)
- The IBM Data Server Driver for JDBC and SQLJ does
not enable client affinities for cascaded failover support. This is
the default.
The effect of the maxRetriesForClientReroute and
retryIntervalForClientReroute properties differs depending on whether
enableClientAffinitiesList is enabled.
This property applies
only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
- enableNamedParameterMarkers
- Specifies whether support for named parameter markers is enabled
in the IBM Data Server Driver for JDBC and SQLJ.
The data type of this property is int. Possible values are:
- DB2BaseDataSource.YES (1)
- Named parameter marker support is enabled in the IBM Data Server Driver for JDBC and SQLJ.
- DB2BaseDataSource.NO (2)
- Named parameter marker support is not enabled in the IBM Data Server Driver for JDBC and SQLJ.
The
driver sends an SQL statement with named parameter markers to the
target data source without modification. The success or failure of
the statement depends on a number of factors, including the following
ones:
- Whether the target data source supports named parameter markers
- Whether the deferPrepares property value is true of false
- Whether the sendDataAsIs property value is true of false
Recommendation: To avoid unexpected
behavior in an application that uses named parameter markers, set
enableNamedParameterMarkers to YES.
- DB2BaseDataSource.NOT_SET (0)
- The behavior is the same as the behavior for DB2BaseDataSource.NO (2). This is the
default.
- enableSeamlessFailover
- Specifies whether the IBM Data Server Driver for JDBC and SQLJ uses
seamless failover for client reroute. The data type of this property
is int.
For connections to DB2 for z/OS,
if enableSysplexWLB is set to true, enableSeamlessFailover
has no effect. The IBM Data Server Driver for JDBC and SQLJ uses
seamless failover regardless of the enableSeamlessFailover setting.
Possible
values of enableSeamlessFailover are:
- DB2BaseDataSource.YES (1)
- The IBM Data Server Driver for JDBC and SQLJ uses
seamless failover. This means that the driver does not throw an SQLException with
SQL error code -4498 after a failed connection has been successfully
re-established if the following conditions are true:
- The connection was not being used for a transaction at the time
the failure occurred.
- There are no outstanding global resources, such as global temporary
tables or open, held cursors, or connection states that prevent a
seamless failover to another server.
When seamless failover occurs, after the connection to a new
data source has been established, the driver re-issues the SQL statement
that was being processed when the original connection failed.
Recommendation: Set
the queryCloseImplicit property to DB2BaseDataSource.QUERY_CLOSE_IMPLICIT_NO (2)
when you set enableSeamlessFailover to DB2BaseDataSource.YES,
if the application uses held cursors.
- DB2BaseDataSource.NO (2)
- The IBM Data Server Driver for JDBC and SQLJ does
not use seamless failover.
When this setting is in effect, if a
server goes down, the driver tries to fail back or fail over to an
alternate server. If failover or failback is successful, the driver
throws an SQLException with SQL error code -4498,
which indicates that a connection failed but was successfully reestablished.
An SQLException with SQL error code -4498 informs
the application that it should retry the transaction during which
the connection failure occurred. If the driver cannot reestablish
a connection, it throws an SQLException with SQL
error code -4499.
- DB2BaseDataSource.NOT_SET (0)
- The IBM Data Server Driver for JDBC and SQLJ does
not use seamless failover. This is the default.
- enableSysplexWLB
- Indicates whether the Sysplex workload balancing function of the IBM Data Server Driver for JDBC and SQLJ is
enabled. The data type of enableSysplexWLB is boolean. The default
is false.
Unless you have a DB2 for Linux, UNIX, and Windows pureScale
database, set enableSysplexWLB to false.
enableSysplexWLB
applies only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
- fetchSize
- Specifies the default fetch size for ResultSet objects
that are generated from Statement objects. The
data type of this property is int.
The fetchSize default can be
overridden by the Statement.setFetchSize method.
The fetchSize property does not affect Statement objects
that already exist when fetchSize is set.
Possible
values of fetchSize are:
- 0 or positive-integer
- The default fetchSize value for newly created Statement objects.
If the fetchSize property value is invalid, the IBM Data Server Driver for JDBC and SQLJ sets
the default fetchSize value to 0.
- DB2BaseDataSource.FETCHSIZE_NOT_SET (-1)
- Indicates that the default fetchSize value
for Statement objects is 0. This is the property
default.
The fetchSize property differs from the queryDataSize
property. fetchSize affects the number of rows that are returned,
and queryDataSize affects the number of bytes that are returned.
- fullyMaterializeLobData
- Indicates whether the driver retrieves LOB locators for FETCH
operations. The data type of this property is boolean.
The effect of fullyMaterializeLobData depends on
whether the data source supports progressive streaming, which is also
known as dynamic data format: - If the data source does not support progressive
streaming:
If the value of fullyMaterializeLobData
is true, LOB data is fully materialized within the
JDBC driver when a row is fetched. If the value is false,
LOB data is streamed. The driver uses locators internally to retrieve
LOB data in chunks on an as-needed basis It is highly recommended
that you set this value to false when you retrieve
LOBs that contain large amounts of data. The default is true.
- If the data source supports progressive
streaming:
The JDBC driver ignores the value of fullyMaterializeLobData
if the progressiveStreaming property is set to DB2BaseDataSource.YES or DB2BaseDataSource.NOT_SET.
This property has no effect on stored procedure parameters
or on LOBs that are fetched using scrollable cursors. LOB stored procedure
parameters are always fully materialized. LOBs that are fetched using
scrollable cursors use LOB locators if progressive streaming is not
in effect.
- implicitRollbackOption
- Specifies the actions that the IBM Data Server Driver for JDBC and SQLJ takes
when a transaction encounters a deadlock or a timeout. Possible values
are:
- DB2BaseDataSource.IMPLICIT_ROLLBACK_OPTION_NOT_CLOSE_CONNECTION (1)
- The IBM Data Server Driver for JDBC and SQLJ throws
an SQLException with an SQL error code that indicates
that a deadlock or timeout occurred. The SQL error code is the SQL
error code that is generated by the data server after a deadlock or
timeout. The driver does not close the connection.
- DB2BaseDataSource.IMPLICIT_ROLLBACK_OPTION_CLOSE_CONNECTION (2)
- The IBM Data Server Driver for JDBC and SQLJ throws
a DisconnectException with SQL error code -4499
when a deadlock or timeout occurs. The driver closes the connection.
If automatic client reroute or Sysplex workload balancing is enabled,
the driver disables automatic failover behavior.
- DB2BaseDataSource.IMPLICIT_ROLLBACK_OPTION_NOT_SET (0)
- This is the default. The IBM Data Server Driver for JDBC and SQLJ throws
an SQLException with an SQL error code that indicates
that a deadlock or timeout occurred. The SQL error code is the SQL
error code that is generated by the data server after a deadlock or
timeout. The driver does not close the connection.
- interruptProcessingMode
- Specifies the behavior of the IBM Data Server Driver for JDBC and SQLJ when
an application executes the Statement.cancel method.
Possible values are:
- DB2BaseDataSource.INTERRUPT_PROCESSING_MODE_DISABLED (0)
- Interrupt processing is disabled. When an application executes Statement.cancel,
the IBM Data Server Driver for JDBC and SQLJ does
nothing.
- DB2BaseDataSource.INTERRUPT_PROCESSING_MODE_STATEMENT_CANCEL (1)
- When an application executes Statement.cancel,
the IBM Data Server Driver for JDBC and SQLJ cancels
the currently executing statement, if the data server supports interrupt
processing. If the data server does not support interrupt processing,
the IBM Data Server Driver for JDBC and SQLJ throws
an SQLException that indicates that the feature
is not supported. INTERRUPT_PROCESSING_MODE_STATEMENT_CANCEL is the
default.
- DB2BaseDataSource.INTERRUPT_PROCESSING_MODE_CLOSE_SOCKET (2)
- When an application executes Statement.cancel,
the IBM Data Server Driver for JDBC and SQLJ drops
the underlying socket. The connection is not closed and can be reused
to resubmit the statement. When the connection is reused, the driver
obtains a new socket.
For connections to DB2 for z/OS data
servers, the IBM Data Server Driver for JDBC and SQLJ always
uses this value, regardless of the value that is specified.
If interruptProcessingMode is set to DB2BaseDataSource.INTERRUPT_PROCESSING_MODE_STATEMENT_CANCEL or DB2BaseDataSource.INTERRUPT_PROCESSING_MODE_CLOSE_SOCKET,
and Statement.cancel is executed while an application
is executing a method on a ResultSet object, the
operation on the ResultSet object might not be
canceled. When the Statement.cancel statement is
executed, if the underlying processing for the ResultSet method
is currently in the data server, execution of the operation is canceled.
If the underlying processing for the ResultSet method
is in the driver, execution of the operation is not canceled.
- keepAliveTimeOut
- The maximum time in seconds before each TCP KeepAlive signal is
sent to the data server. The data type of this property is int. The
default is 15 seconds.
IBM Data Server Driver for JDBC and SQLJ type 4 connectivity uses
the TCP/IP protocol to communicate with data servers. To prevent potential
failover issues caused by timeouts within the TCP/IP layer, it is
necessary to adjust the TCP/IP KeepAlive parameters on the client.
Decreasing the KeepAlive values on the client improves timely detection
of server failures.
A value of 0 means that the timeout value is the
default system timeout value.
keepAliveTimeOut is supported
only for IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
- loginTimeout
- The maximum time in seconds to wait for a connection to a
data source. After the number of seconds that are specified by
loginTimeout have elapsed, the driver closes the connection to the
data source. 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. This property is not supported for IBM Data Server Driver for JDBC and SQLJ type 2 connectivity on DB2 for z/OS.
If the data server environment is a DB2 for z/OS Sysplex
workload balancing environment or a DB2 pureScale environment,
the wait time for a connection is determined by a combination of loginTimeout,
maxRetriesForClientReroute, and retryIntervalForClientReroute. loginTimeout
determines only the time for a single attempt to establish a connection
to a data server. There might be multiple attempts to establish a
connection, based on the maxRetriesForClientReroute value. There might
also be gaps between attempts to establish a connection, based on
the retryIntervalForClientReroute value.
During automatic client reroute processing, the memberConnectTimeout
property takes precedence over the loginTimeout property.
- logWriter
- The character output stream to which all logging and trace messages
for the DataSource 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 DataSource is output.
- maxRetriesForClientReroute
- During automatic client reroute, limits the number of retries
if the primary connection to the data server fails.
The data type
of this property is int.
The meaning of a retry and the default
depend on the data server:
- For connections to DB2 for Linux, UNIX, and Windows or IBM Informix data
servers:
- Meaning of a retry: If enableClientAffinitiesList
is set to DB2BaseDataSource.NO (2), an attempt
to connect to the primary server and alternate servers counts as one
retry.
If enableClientAffinitiesList is set to DB2BaseDataSource.YES (1),
an attempt to connect to each server that is specified by the clientRerouteAlternateServerName
and clientRerouteAlternatePortNumber values counts as one retry. Each
server connection is retried the number of times that is specified
by maxRetriesForClientReroute.
For a connection
to a DB2 pureScale instance:
- For version 3.67 or 4.17, or later, a retry is an attempt to connect
to all members of the DB2 pureScale instance.
- For versions of the IBM Data Server Driver for JDBC and SQLJ before
3.67 or 4.17, a retry is an attempt to connect to a single member.
- Default: If enableClientAffinitiesList is set to DB2BaseDataSource.NO (2),
and maxRetriesForClientReroute and retryIntervalForClientReroute are
not set, the connection is retried for 10 minutes, with a wait time
between retries that increases as the length of time from the first
retry increases.
If enableClientAffinitiesList is DB2BaseDataSource.YES
(1), the default is 3.
- For connections to DB2 for z/OS data
servers:
- Meaning of a retry:
- For version 3.66
or 4.16, or later, one retry means one attempt to connect to all members
of the data sharing group other than the failed member, and to the
group IP address.
- For versions of the IBM Data Server Driver for JDBC and SQLJ before
3.66 or 4.16, one retry means an attempt to connect to one member
of the data sharing group.
- Default:
- For version 3.66
or 4.16, or later, of the IBM Data Server Driver for JDBC and SQLJ,
the default is 1.
- For versions 3.64,
4.14, 3.65, or 4.15, the default is 5.
- For versions of the IBM Data Server Driver for JDBC and SQLJ before
3.64 and 4.14, the connection is retried for 10 minutes, with a wait
time between retries that increases as the length of time from the
first retry increases.
If the value of maxRetriesForClientReroute is
0, client reroute processing does not occur.
- maxStatements
- Controls an internal statement cache that is associated with a Connection.
The data type of this property is int. Possible values are:
- positive integer
- Enables the internal statement cache for a Connection,
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 Connection.
0 is the default.
com.ibm.db2.jcc.DB2SimpleDataSource.maxStatements
controls the internal statement cache that is associated with a Connection only
when the Connection object is created. com.ibm.db2.jcc.DB2SimpleDataSource.maxStatements
has no effect on caching in an already existing Connection object.
com.ibm.db2.jcc.DB2SimpleDataSource.maxStatements
applies only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
- memberConnectTimeout
- Specifies the amount of time in seconds before an attempt to open
a socket to a member of a DB2 for z/OS data
sharing group, DB2 pureScale instance,
or IBM Informix high
availability cluster fails. The data type of this property is int.
memberConnectTimeout applies only to socket connection
attempts to different members during automatic client reroute processing.
The memberConnectTimeout property takes precedence over the loginTimeout
property.
For connections to DB2 for z/OS data
servers, the default is one second. For connections to other data
servers, the default is 0.
If the memberConnectTimeout value
is less than or equal to 0, the driver uses the loginTimeout value
to determine how long to wait before failing a connection request.
The
memberConnectTimeout value is used for every socket open operation
to each member in a member list.
For a connection to a DB2 for z/OS data
sharing group, after all attempts to open a socket to all members
fail, the driver retries the socket open using a group IP address.
For that retry, the driver uses the loginTimeout value to determine
how long to wait before failing the connection request.
- password
- The password to use for establishing connections. The data type
of this property is String. When you use the DataSource interface
to establish a connection, you can override this property value by
invoking this form of the DataSource.getConnection method:
getConnection(user, password);
- portNumber
- The port number where the DRDA® server
is listening for requests. The data type of this property is int.
- progressiveStreaming
- Specifies whether the JDBC driver uses progressive streaming when
progressive streaming is supported on the data source.
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.
With
progressive streaming, also known as dynamic data format, the data
source dynamically determines the most efficient mode in which to
return LOB or XML data, based on the size of the LOBs or XML objects.
The value of the streamBufferSize parameter determines whether the
data is materialized when it is returned.
The data type of progressiveStreaming
is int. Valid values are DB2BaseDataSource.YES (1)
and DB2BaseDataSource.NO (2). If the progressiveStreaming
property is not specified, the progressiveStreaming value is DB2BaseDataSource.NOT_SET (0).
If
the connection is to a data source that supports progressive streaming,
and the value of progressiveStreaming is DB2BaseDataSource.YES or DB2BaseDataSource.NOT_SET,
the JDBC driver uses progressive streaming to return LOBs and XML
data.
If the value of progressiveStreaming is DB2BaseDataSource.NO,
or the data source does not support progressive streaming, the way
in which the JDBC driver returns LOB or XML data depends on the value
of the fullyMaterializeLobData property.
- queryCloseImplicit
- Specifies whether cursors are closed immediately after all rows
are fetched. queryCloseImplicit applies only to connections to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity to DB2 for z/OS Version
8 or later, and IBM Data Server Driver for JDBC and SQLJ type 4 connectivity or IBM Data Server Driver for JDBC and SQLJ type 2 connectivityDB2 for Linux, UNIX, and Windows Version
9.7 or later. Possible values are:
- DB2BaseDataSource.QUERY_CLOSE_IMPLICIT_YES (1)
- Close cursors immediately after all rows are fetched.
A value
of DB2BaseDataSource.QUERY_CLOSE_IMPLICIT_YES can
provide better performance because this setting results in less network
traffic.
- DB2BaseDataSource.QUERY_CLOSE_IMPLICIT_NO (2)
- Do not close cursors immediately after all rows are fetched.
- DB2BaseDataSource.QUERY_CLOSE_IMPLICIT_COMMIT (3)
- Perform these actions:
- Implicitly close the cursor after all rows are fetched.
- If the application is in autocommit mode, implicitly send a commit
request to the data source for the current unit of work.
Important: When this value is set, there might be
impacts on other resources, just as an explicit commit operation might
impact other resources. For example, other non-held cursors are closed,
LOB locators go out of scope, progressive references are reset, and
scrollable cursors lose their position.
Restriction: The
following restrictions apply to QUERY_CLOSE_IMPLICIT_COMMIT behavior:
- This behavior applies only to SELECT statements that are issued
by the application. It does not apply to SELECT statements that are
generated by the IBM Data Server Driver for JDBC and SQLJ.
- If QUERY_CLOSE_IMPLICIT_COMMIT is set, and the application is
not in autocommit mode, the driver uses the default behavior (QUERY_CLOSE_IMPLICIT_NOT_SET
behavior). If QUERY_CLOSE_IMPLICIT_COMMIT is the default behavior,
the driver uses QUERY_CLOSE_IMPLICIT_YES behavior.
- If QUERY_CLOSE_IMPLICIT_COMMIT is set, and the data source does
not support QUERY_CLOSE_IMPLICIT_COMMIT behavior, the driver uses
QUERY_CLOSE_IMPLICIT_YES behavior.
- This behavior is not supported for batched statements.
- This behavior is supported on an XA Connection only when the connection
is in a local transaction.
- DB2BaseDataSource.QUERY_CLOSE_IMPLICIT_NOT_SET (0)
- This is the default. The following table describes the behavior
for a connection to each type of data source.
Data source |
Version |
Data sharing environment |
Behavior |
DB2 for z/OS |
Version 10 |
Data sharing or non-data sharing |
QUERY_CLOSE_IMPLICIT_COMMIT |
DB2 for z/OS |
Version 9 with APAR PK68746 |
Non-data sharing, or in a data sharing group
but not in coexistence mode with Version 8 members |
QUERY_CLOSE_IMPLICIT_COMMIT |
DB2 for z/OS |
Version 9 without APAR PK68746 |
Non-data sharing, or in a data sharing group
but not in coexistence mode with Version 8 members |
QUERY_CLOSE_IMPLICIT_YES |
DB2 for z/OS |
Version 9 with APAR PK68746 |
In a data sharing group in coexistence mode
with Version 8 members |
QUERY_CLOSE_IMPLICIT_COMMIT |
DB2 for z/OS |
Version 9 without APAR PK68746 |
In a data sharing group in coexistence mode
with Version 8 members |
QUERY_CLOSE_IMPLICIT_YES |
DB2 for z/OS |
Version 8 with or without APAR PK68746 |
|
QUERY_CLOSE_IMPLICIT_YES |
DB2 for Linux, UNIX, and Windows |
Version 9.7 |
|
QUERY_CLOSE_IMPLICIT_YES |
- queryDataSize
- Specifies a hint that is used to control the amount of query data,
in bytes, that is returned from the data source on each fetch operation.
This value can be used to optimize the application by controlling
the number of trips to the data source that are required to retrieve
data.
Use of a larger value for queryDataSize can result in less
network traffic, which can result in better performance. For example,
if the result set size is 50 KB, and the value of queryDataSize is
32767 (32KB), two trips to the database server are required to retrieve
the result set. However, if queryDataSize is set to 65535 (64 KB),
only one trip to the data source is required to retrieve the result
set.
The following table lists minimum, maximum, and default
values of queryDataSize for each data source.
Table 2. Default, minimum,
and maximum values of queryDataSizeData source |
Product Version |
Default |
Minimum |
Maximum |
Valid values |
DB2 for Linux, UNIX, and Windows |
All |
32767 |
4096 |
262143 |
4096-32767, 98303, 131071, 163839, 196607,
229375, 2621431 |
IBM Informix |
All |
32767 |
4096 |
10485760 |
4096-10485760 |
DB2 for
i |
V5R4 |
32767 |
4096 |
65535 |
4096-65535 |
DB2 for
i |
V6R1 |
32767 |
4096 |
262143 |
4096-65535, 98303, 131071, 163839, 196607,
229375, 2621431 |
DB2 for z/OS |
Version 8 (IBM Data Server Driver for JDBC and SQLJ type 4 connectivity) |
32767 |
32767 |
32767 |
32767 |
DB2 for z/OS |
Version 9 (IBM Data Server Driver for JDBC and SQLJ type 4 connectivity) |
32767 |
32767 |
65535 |
32767, 65535 |
DB2 for z/OS |
Version 10 (IBM Data Server Driver for JDBC and SQLJ type 4 connectivity) |
32767 |
32767 |
262143 |
32767, 65535, 98303, 131071, 163839, 196607,
229375, 2621431 |
DB2 for z/OS |
Version 10 (IBM Data Server Driver for JDBC and SQLJ type 2 connectivity) |
32767 |
32767 |
1048575 |
32767, 65535, 98303, 131071, 163839, 196607,
229375, 262143, 294911, 327679, 360447, 393215, 425983, 458751, 491519,
524287, 557055, 589823, 622591, 655359, 688127, 720895, 753663, 786431,
819199, 851967, 884735, 917503, 950271, 983039, 1015807, 10485751 |
Note: - If you specify a value between the minimum
and maximum value that is not a valid value, the IBM Data Server Driver for JDBC and SQLJ sets
queryDataSize to the nearest valid value.
|
- queryTimeoutInterruptProcessingMode
- Specifies what happens when the query timeout interval for a Statement object
expires. Valid values are:
- DB2BaseDataSource.INTERRUPT_PROCESSING_MODE_STATEMENT_CANCEL
(1)
- Specifies that when the query timeout interval for a Statement object
expires, the IBM Data Server Driver for JDBC and SQLJ cancels
the currently executing SQL statement and throws an exception with
SQL error -952, if the data server supports interruption of SQL statements.
If the data server does not support interruption of SQL statements,
the driver throws an exception that indicates that the feature is
not supported.
For connections to data servers other than DB2 for z/OS,
INTERRUPT_PROCESSING_MODE_STATEMENT_CANCEL is the default.
For
connections to DB2 for z/OS data
servers, INTERRUPT_PROCESSING_MODE_STATEMENT_CANCEL is not a possible
value. If it is specified, the driver uses INTERRUPT_PROCESSING_MODE_CLOSE_SOCKET
instead.
- DB2BaseDataSource.INTERRUPT_PROCESSING_MODE_CLOSE_SOCKET (2)
- Specifies that the underlying socket is dropped and the connection
is closed when the query timeout interval for a Statement object
expires.
For connections to data
servers other than DB2 for z/OS,
when the Statement object times out:
- If automatic client reroute is not enabled and enableSysplexWLB
is set to false, an exception with SQL error code
-4499 is thrown. Any subsequent operations on the Statement object,
or on any other Statement objects that were created
from the same connection receive an Exception that
indicates that the connection is closed. After a Statement object
times out, the application must establish a new connection before
it can execute a new transaction.
- If automatic client reroute is enabled, and enableSysplexWLB is
set to false, the IBM Data Server Driver for JDBC and SQLJ tries
to re-establish a connection. If a new connection is successfully
re-established, the driver returns an SQL error code of -4498. However,
the driver does not execute the timed-out SQL statements again, even
if enableSeamlessFailover is set to DB2BaseDataSource.YES (1).
- If enableSysplexWLB is set to true, the IBM Data Server Driver for JDBC and SQLJ tries
to re-establish a connection. If a new connection is successfully
re-established, the driver returns an SQL error code of -30108. However,
the driver does not execute the timed-out SQL statements again, even
if enableSeamlessFailover is set to DB2BaseDataSource.YES (1).
For connections to DB2 for z/OS,
when the Statement object times out:
- If enableSysplexWLB is set to false, an exception
with SQL error code -4499 is thrown. Any subsequent operations on
the Statement object, or on any other Statement objects
that were created from the same connection receive an Exception that
indicates that the connection is closed. After a Statement object
times out, the application must establish a new connection before
it can execute a new transaction.
- If enableSysplexWLB is set to true, the IBM Data Server Driver for JDBC and SQLJ tries
to re-establish a connection. If a new connection is successfully
re-established, the driver returns an SQL error code of -30108. However,
the driver does not execute the timed-out SQL statements again, even
if enableSeamlessFailover is set to DB2BaseDataSource.YES (1).
- resultSetHoldability
- Specifies whether cursors remain open after a commit operation.
The data type of this property is int. Valid values are:
- DB2BaseDataSource.HOLD_CURSORS_OVER_COMMIT (1)
- Leave cursors open after a commit operation.
This
setting is not valid for a connection that is part of a distributed
(XA) transaction.
- DB2BaseDataSource.CLOSE_CURSORS_AT_COMMIT (2)
- Close cursors after a commit operation.
- DB2BaseDataSource.NOT_SET (0)
- This is the default value. The behavior is:
- For connections that are part of distributed (XA) transactions,
cursors are closed after a commit operation.
- For connections that are not part of a distributed transaction:
- For connections to all versions of DB2 for z/OS, DB2 for Linux, UNIX, and Windows,
or DB2 for i servers, or to Cloudscape Version
8.1 or later servers, cursors remain open after a commit operation.
- For connections to all versions of IBM Informix,
or to Cloudscape versions
earlier than Version 8.1, cursors are closed after a commit operation.
- retrieveMessagesFromServerOnGetMessage
- Specifies whether JDBC SQLException.getMessage or SQLWarning.getMessage calls
cause the IBM Data Server Driver for JDBC and SQLJ to
invoke a DB2 for z/OS stored
procedure that retrieves the message text for the error. The data
type of this property is boolean. The default is false,
which means that the full message text is not returned to the client.
For
example, if retrieveMessagesFromServerOnGetMessage is set to
true,
a message similar to this one is returned by
SQLException.getMessage after
an attempt to perform an SQL operation on nonexistent table ADMF001.NO_TABLE:
ADMF001.NO_TABLE IS AN UNDEFINED NAME. SQLCODE=-204,
SQLSTATE=42704, DRIVER=3.50.54
If retrieveMessagesFromServerOnGetMessage
is set to
false, a message similar to this one is
returned:
DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, DRIVER=3.50.54
An
alternative to setting this property to true is to
use the IBM Data Server Driver for JDBC and SQLJ-only DB2Sqlca.getMessage method
in applications. Both techniques result in a stored procedure call,
which starts a unit of work.
- retryIntervalForClientReroute
- For automatic client reroute, specifies the amount of time in
seconds between connection retries.
The data type of this property
is int.
The meaning of a retry and the default depend on the
data server:
- For connections to DB2 for Linux, UNIX, and Windows or IBM Informix data
servers:
- Meaning of a retry: If enableClientAffinitiesList is set
to DB2BaseDataSource.NO (2), an attempt to connect
to the primary server and alternate servers counts as one retry.
If
enableClientAffinitiesList is set to DB2BaseDataSource.YES (1),
an attempt to connect to each server that is specified by the clientRerouteAlternateServerName
and clientRerouteAlternatePortNumber values counts as one retry. Each
server connection is retried the number of times that is specified
by maxRetriesForClientReroute.
- Default: If enableClientAffinitiesList is set to DB2BaseDataSource.NO (2),
and maxRetriesForClientReroute and retryIntervalForClientReroute are
not set, the connection is retried for 10 minutes, with a wait time
between retries that increases as the length of time from the first
retry increases.
If enableClientAffinitiesList is DB2BaseDataSource.YES
(1), the default is 0.
- For connections to DB2 for z/OS data
servers:
- Meaning of a retry:
- For version 3.66
or 4.16, or later, one retry means one attempt to connect to all members
of the data sharing group other than the failed member, and to the
group IP address.
- For versions of the IBM Data Server Driver for JDBC and SQLJ before
3.66 or 4.16, one retry means an attempt to connect to one member
of the data sharing group.
- Default:
- For version 3.64
or 4.14, or later, of the IBM Data Server Driver for JDBC and SQLJ,
the default is 0.
- For versions of the IBM Data Server Driver for JDBC and SQLJ before
3.64 and 4.14, the connection is retried for 10 minutes, with a wait
time between retries that increases as the length of time from the
first retry increases.
- securityMechanism
- Specifies the DRDA security
mechanism. The data type of this property is int. Possible values
are:
- CLEAR_TEXT_PASSWORD_SECURITY (3)
- User ID and password
- USER_ONLY_SECURITY (4)
- User ID only
- ENCRYPTED_PASSWORD_SECURITY (7)
- User ID, encrypted password
- ENCRYPTED_USER_AND_PASSWORD_SECURITY (9)
- Encrypted user ID and password
- KERBEROS_SECURITY (11)
- Kerberos. This value does not apply to connections to IBM Informix.
- ENCRYPTED_USER_AND_DATA_SECURITY (12)
- Encrypted user ID and encrypted security-sensitive data. This
value applies to connections to DB2 for z/OS only.
- ENCRYPTED_USER_PASSWORD_AND_DATA_SECURITY (13)
- Encrypted user ID and password, and encrypted security-sensitive
data. This value does not apply to connections to IBM Informix.
- PLUGIN_SECURITY (15)
- Plug-in security. This value applies to connections to DB2 for Linux, UNIX, and Windows only.
- ENCRYPTED_USER_ONLY_SECURITY (16)
- Encrypted user ID. This value does not apply to connections to IBM Informix.
- TLS_CLIENT_CERTIFICATE_SECURITY (18)
- Client certificate security, using SSL. This value applies to
connections to DB2 for z/OS Version
10 and later only.
If this property is specified, the specified security
mechanism is the only mechanism that is used. If the security mechanism
is not supported by the connection, an exception is thrown.
The
default value for securityMechanism is provided by the db2.jcc.securityMechanism
configuration property. If the db2.jcc.securityMechanism configuration
property is also not specified, the default value for securityMechanism
is CLEAR_TEXT_PASSWORD_SECURITY.
If the data server does not
support CLEAR_TEXT_PASSWORD_SECURITY but supports ENCRYPTED_USER_AND_PASSWORD_SECURITY,
the IBM Data Server Driver for JDBC and SQLJ driver
upgrades the security mechanism to ENCRYPTED_USER_AND_PASSWORD_SECURITY
and attempts to connect to the server. Any other mismatch in security
mechanism support between the requester and the server results in
an error.
This property does not apply to IBM Data Server Driver for JDBC and SQLJ type 2 connectivity on DB2 for z/OS.
Security mechanisms ENCRYPTED_PASSWORD_SECURITY,
ENCRYPTED_USER_AND_PASSWORD_SECURITY, ENCRYPTED_USER_AND_DATA_SECURITY,
ENCRYPTED_USER_PASSWORD_AND_DATA_SECURITY, and ENCRYPTED_USER_ONLY_SECURITY
use DRDA encryption. DRDA encryption is not intended to provide confidentiality
and integrity of passwords or data over a network that is not secure,
such as the Internet. DRDA encryption
uses an anonymous key exchange, Diffie-Hellman, which does not provide
authentication of the server or the client. DRDA encryption is vulnerable
to man-in-the-middle attacks.
- sendDataAsIs
- Specifies that the IBM Data Server Driver for JDBC and SQLJ does
not convert input parameter values to the target column data types.
The data type of this property is boolean. The default is false.
You
should use this property only for applications that always ensure
that the data types in the application match the data types in the
corresponding database tables.
- serverName
- The host name or the TCP/IP address of the data source. The data
type of this property is String.
- sslCertLocation
- Specifies that an application can configure the location of a
trusted certificate file. For applications that are in possession
of the database server certificate, sslCertLocation is the only property
that is needed to be configured to instruct IBM Data Server Driver for JDBC and SQLJ to
trust the certificate for SSL connections. This property removes the
need to import the certificate into a Java truststore database and
related driver configurations.
The default value for sslCertLocation
is provided by the db2.jcc.sslCertLocation configuration property.
If the db2.jcc.sslCertLocation configuration property is not specified,
sslTruststoreLocation and sslCertLocation properties are not configured,
and sslConnection is set to true, IBM Data Server Driver for JDBC and SQLJ uses
the default truststore for the Java runtime environment.
The
sslCertLocation property accepts certificate location values in the
following forms:
- File extensions: .arm, .pem, .cert, .crt, and .der.
- Full path to the certificate file: sslCertLocation=/path/to/cert.arm
- Path relative to the current class path:sslCertLocation=classpath:relative/cert.arm
- DER-encoded certificates in binary or Base64 ASCII encoding. If
the certificate is provided in Base64 encoding, the file content must
be bound at the beginning by -----BEGIN CERTIFICATE----- and
at the end by -----END CERTIFICATE-----.
- sslConnection
- Specifies whether the IBM Data Server Driver for JDBC and SQLJ uses
an SSL socket to connect to the data source. If sslConnection is set
to true, the connection uses an SSL socket. If sslConnection
is set to false, the connection uses a plain socket.
The default value for sslConnection is provided by the
db2.jcc.sslConnection configuration property. If the db2.jcc.sslConnection
configuration property is also not specified, the default value for
sslConnection is false.
This property is applicable
only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
- sslTrustStoreLocation
- Specifies the name of the Java truststore
on the client that contains the server certificate for an SSL connection.
The IBM Data Server Driver for JDBC and SQLJ uses
this option only if the sslConnection property is set to true.
If
sslTrustStoreLocation is set, and sslConnection is set to true,
the IBM Data Server Driver for JDBC and SQLJ uses
the sslTrustStoreLocation value instead of the value in the javax.net.ssl.trustStore Java property.
The default value for sslTrustStoreLocation is provided
by the db2.jcc.sslTrustStoreLocation configuration property. If the
db2.jcc.sslTrustStoreLocation configuration property is also not specified,
the default value for sslTrustStoreLocation is null.
This property
is applicable only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
- sslTrustStorePassword
- Specifies the password for the Java truststore
on the client that contains the server certificate for an SSL connection.
The IBM Data Server Driver for JDBC and SQLJ uses
this option only if the sslConnection property is set to true.
If
sslTrustStorePassword is set, and sslConnection is set to true,
the IBM Data Server Driver for JDBC and SQLJ uses
the sslTrustStorePassword value instead of the value in the javax.net.ssl.trustStorePassword Java property.
The default value for sslTrustStorePassword is provided
by the db2.jcc.sslTrustStorePassword configuration property. If the
db2.jcc.sslTrustStorePassword configuration property is also not specified,
the default value for sslTrustStorePassword is null.
This property
is applicable only to IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
- stripTrailingZerosForDecimalNumbers
- Specifies whether the IBM Data Server Driver for JDBC and SQLJ removes
trailing zeroes when it retrieves data from a DECFLOAT, DECIMAL, or
NUMERIC column. This property is meaningful only if the SDK for Java is Version 1.5 or later. The
data type of this property is int.
Possible values are:
- DB2BaseDataSource.NOT_SET (0)
- The IBM Data Server Driver for JDBC and SQLJ does
not remove trailing zeroes from the retrieved value. This is the default.
- DB2BaseDataSource.YES (1)
- The IBM Data Server Driver for JDBC and SQLJ removes
trailing zeroes when it retrieves a value from a DECFLOAT, DECIMAL,
or NUMERIC column as a java.math.BigDecimal object.
For
example, when the driver retrieves the value 234.04000, it returns
the value 234.04 to the application.
- DB2BaseDataSource.NO (2)
- The IBM Data Server Driver for JDBC and SQLJ does
not remove trailing zeroes from the retrieved value.
- timerLevelForQueryTimeOut
- Specifies the level at which the IBM Data Server Driver for JDBC and SQLJ creates
a java.util.Timer object for waiting for query
execution to time out. Possible values are:
- DB2BaseDataSource.QUERYTIMEOUT_STATEMENT_LEVEL (1)
- The IBM Data Server Driver for JDBC and SQLJ creates
a Timer object for each Statement object.
When the Statement object is closed, the driver
deletes the Timer object. This is the default.
- DB2BaseDataSource.QUERYTIMEOUT_CONNECTION_LEVEL (2)
- The IBM Data Server Driver for JDBC and SQLJ creates
a Timer object for each Connection object.
When the Connection object is closed, the driver
deletes the Timer object.
- DB2BaseDataSource.QUERYTIMEOUT_DISABLED (-1)
- The IBM Data Server Driver for JDBC and SQLJ does
not create a Timer object to control query execution
timeout.
- timestampFormat
- Specifies the format in which the result of the ResultSet.getString or CallableStatement.getString method
against a TIMESTAMP column is returned. The data type of timestampFormat
is int.
Possible values of timestampFormat are:
Constant |
Integer value |
Format |
com.ibm.db2.jcc.DB2BaseDataSource.ISO |
1 |
yyyy-mm-dd-hh.mm.ss.nnnnnnnnn1 |
com.ibm.db2.jcc.DB2BaseDataSource.JDBC |
5 |
yyyy-mm-dd
hh:mm:ss.nnnnnnnnn1 |
Note: - The number of digits in the fractional part of the
timestamp depends on the precision of the TIMESTAMP(p)
column in the source table. If p<9, p digits
are returned. If p>=9, 9 digits are returned, and
the remaining digits are truncated.
|
The default is
com.ibm.db2.jcc.DB2BaseDataSource.JDBC.
timestampFormat
affects the format of output only.
- timestampPrecisionReporting
- Specifies whether trailing zeroes are truncated in the result
of a Resultset.getString call for a TIMESTAMP value.
The data type of this property is int. Possible values are:
- TIMESTAMP_JDBC_STANDARD (1)
- Trailing zeroes are truncated in the result of a Resultset.getString call
for a TIMESTAMP value. This is the default.
For example:
- A TIMESTAMP value of 2009-07-19-10.12.00.000000 is truncated to
2009-07-19-10.12.00.0 after retrieval.
- A TIMESTAMP value of 2009-12-01-11.30.00.100000 is truncated to
2009-12-01-11.30.00.1 after retrieval.
- TIMESTAMP_ZERO_PADDING (2)
- Trailing zeroes are not truncated in the result of a Resultset.getString call
for a TIMESTAMP value.
- traceDirectory
- Specifies a directory into which trace information is written.
The data type of this property is String. When traceDirectory
is specified, trace information for multiple connections on the same DataSource is
written to multiple files.
When traceDirectory is specified, a
connection is traced to a file named traceFile_origin_n.
n is
the nth connection for a DataSource.
origin indicates
the origin of the log writer that is in use. Possible values of origin are:
- cpds
- The log writer for a DB2ConnectionPoolDataSource object.
- driver
- The log writer for a DB2Driver object.
- global
- The log writer for a DB2TraceManager object.
- sds
- The log writer for a DB2SimpleDataSource object.
- xads
- The log writer for a DB2XADataSource object.
If the traceFile property is also specified, the traceDirectory
value is not used.
- 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.
- traceFileAppend
- Specifies whether to append to or overwrite the file that is specified
by the traceFile property. The data type of this property is boolean.
The default is false, which means that the file that
is specified by the traceFile property is overwritten.
- traceLevel
- Specifies what to trace. The data type of this property is int.
You can specify one or more of the following traces with the traceLevel
property:
- 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
(X'800') (IBM Data Server Driver for JDBC and SQLJ type 2 connectivity for DB2 for Linux, UNIX, and Windows only)
- 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_SYSTEM_MONITOR (X'20000')
- com.ibm.db2.jcc.DB2BaseDataSource.TRACE_TRACEPOINTS
(X'40000')
- com.ibm.db2.jcc.DB2BaseDataSource.TRACE_SYSPLEX (X'80000')
(for version 3.68 or 4.18, or later, of the IBM Data Server Driver for JDBC and SQLJ,
and connections to DB2 for z/OS data
sharing groups)
- com.ibm.db2.jcc.DB2BaseDataSource.TRACE_ALL (X'FFFFFFFF')
To specify more than one trace, use one of these techniques:
- traceFileCount
- Specifies the maximum number of trace files for circular tracing.
The IBM Data Server Driver for JDBC and SQLJ uses
this property only when traceOption is set to DB2BaseDataSource.TRACE_OPTION_CIRCULAR (1).
The data type of this property is int. The default value is 2.
- traceFileSize
- Specifies the maximum size of each trace file, for circular tracing.
The IBM Data Server Driver for JDBC and SQLJ uses
this property only when traceOption is set to DB2BaseDataSource.TRACE_OPTION_CIRCULAR (1).
The data type of this property is int. The default value is 10485760
(10 MB).
- useJDBC41DefinitionForGetColumns
- Specifies whether the DatabaseMetaData.getColumns method
returns a result set with a column with the name SCOPE_CATALOG or
SCOPE_CATLOG. Possible values are:
- DB2BaseDataSource.NOT_SET (0)
- Specifies that for version 4.13 or later of the IBM Data Server Driver for JDBC and SQLJ,
the result set from DatabaseMetaData.getColumns contains
a column named SCOPE_CATALOG. For version 4.12 or earlier of the IBM Data Server Driver for JDBC and SQLJ,
that column is named SCOPE_CATLOG.
- DB2BaseDataSource.YES (1)
- Specifies that for version 4.13 or later of the IBM Data Server Driver for JDBC and SQLJ,
the result set from DatabaseMetaData.getColumns contains
a column named SCOPE_CATALOG. For version 4.12 or earlier of the IBM Data Server Driver for JDBC and SQLJ,
that column is named SCOPE_CATLOG.
- DB2BaseDataSource.NO (2)
- Specifies that for all versions of the IBM Data Server Driver for JDBC and SQLJ,
the result set from DatabaseMetaData.getColumns contains
a column named SCOPE_CATLOG.
- traceOption
- Specifies the way in which trace data is collected. The data type
of this property is int. Possible values are:
- DB2BaseDataSource.NOT_SET (0)
- Specifies that a single trace file is generated, and that there
is no limit to the size of the file. This is the default.
If the
value of traceOption is NOT_SET, the traceFileSize and traceFileCount
properties are ignored.
- DB2BaseDataSource.TRACE_OPTION_CIRCULAR (1)
- Specifies that the IBM Data Server Driver for JDBC and SQLJ does
circular tracing. Circular tracing is done as follows:
- When an application writes its first trace record, the driver
creates a file.
- The driver writes trace data to the file.
- When the size of the file is equal to the value
of property traceFileSize, the driver creates another file.
- The driver repeats steps 2 and 3 until the number of files
to which data has been written is equal to the value of property traceFileCount.
- The driver writes data to the first trace file,
overwriting the existing data.
- The driver repeats steps 3 through 5 until the application
completes.
The file names for the trace files are the file names that
are determined by the traceFile or traceDirectory property, appended
with .1 for the first file, .2 for the second file, and so on.
- user
- The user ID to use for establishing connections. The data type
of this property is String. When you use the DataSource interface
to establish a connection, you can override this property value by
invoking this form of the DataSource.getConnection method:
getConnection(user, password);
- xaNetworkOptimization
- Specifies whether XA network optimization is enabled for IBM Data Server Driver for JDBC and SQLJ type 4 connectivity.
You might need to disable XA network optimization in an environment
in which an XA Start and XA End are issued from one Java process, and an XA Prepare and an XA Commit
are issued from another Java process.
With XA network optimization, the XA Prepare can reach the data source
before the XA End, which results in an XAER_PROTO error. To prevent
the XAER_PROTO error, disable XA network optimization.
The default
is true, which means that XA network optimization
is enabled. If xaNetworkOptimization is false, which
means that XA network optimization is disabled, the driver closes
any open cursors at XA End time.
xaNetworkOptimization can be
set on a DataSource object, or in the url parameter
in a getConnection call. The value of xaNetworkOptimization
cannot be changed after a connection is obtained.