Client info properties support by the IBM Data Server Driver for JDBC and SQLJ

JDBC 4.0 includes client info properties, which contain information about a connection to a data source. The DatabaseMetaData.getClientInfoProperties method returns a list of client info properties that the IBM Data Server Driver for JDBC and SQLJ supports.

When you call DatabaseMetaData.getClientInfoProperties, a result set is returned that contains the following columns:
  • NAME
  • MAX_LEN
  • DEFAULT_VALUE
  • DESCRIPTION

The following table lists the client info property values that the IBM Data Server Driver for JDBC and SQLJ returns for Db2® on Linux®, UNIX, and Windows systems and for Db2 for IBM i.

Table 1. Client info property values for Db2 on Linux, UNIX, and Windows systems and for Db2 for IBM i
NAME MAX_LEN (bytes) DEFAULT_VALUE DESCRIPTION
ClientAccountingInformation 255 Empty string The value of the accounting string from the client information that is specified for the connection. This value is stored in Db2 special register CURRENT CLIENT_ACCTNG.
ApplicationName 255 Empty string The name of the application that is currently using the connection. This value is stored in Db2 special register CURRENT CLIENT_APPLNAME.
ClientUser 255 Empty string The name of the user on whose behalf the application that is using the connection is running. This value is stored in Db2 special register CURRENT CLIENT_USERID.
ClientHostname 255

Starting with version 3.68 or 4.18 of the IBM Data Server Driver for JDBC and SQLJ, if ClientHostname is set to any value other than an IP address, no value is sent to the data server.

The host name of the computer on which the application that is using the connection is running. This value is stored in Db2 special register CURRENT CLIENT_WRKSTNNAME.

The following table lists the client info property values that the IBM Data Server Driver for JDBC and SQLJ returns for Db2 for z/OS® when the connection uses type 4 connectivity.

Table 2. Client info property values for type 4 connectivity to Db2 for z/OS
NAME MAX_LEN (bytes) DEFAULT_VALUE DESCRIPTION
ClientAccountingInformation 255 A string of the form JCCversionclient-ip, where version is the driver version, and client-ip is the IP address of the client. The value of the accounting string from the client information that is specified for the connection. This value is stored in Db2 special register CURRENT CLIENT_ACCTNG.
ApplicationName 255 The string "db2jcc_application". The name of the application that is currently using the connection. This value is stored in Db2 special register CURRENT CLIENT_APPLNAME.1
ClientCorrelationToken 255 An LUWID (logical unit of work ID) that the data server generates. A unique value that allows you to correlate your business processes across the enterprise. This value is stored in Db2 special register CURRENT CLIENT_CORR_TOKEN. The client correlation token value is available in the accounting correlation header record of a Db2 trace, and in the -DISPLAY THREAD command output.
ClientUser 128 The user ID that was specified when the connection was established. The name of the user on whose behalf the application that is using the connection is running. This value is stored in Db2 special register CURRENT CLIENT_USERID.2
ClientHostname 255 Before version 3.68 or 4.18 of the IBM Data Server Driver for JDBC and SQLJ The string "db2jcc_local".

For version 3.68 or 4.18, or later of the IBM Data Server Driver for JDBC and SQLJ, if ClientHostname is set to any value other than an IP address, no value is sent to the data server.

The host name of the computer on which the application that is using the connection is running. This value is stored in Db2 special register CURRENT CLIENT_WRKSTNNAME.
Notes:
  1. Db2 for z/OS traces for IFCID 411, which collect statistics for application names, are limited to 6000 unique application names. If this limit is exceeded, the Db2 data server issues error DSNL030I with reason code 00D3105D, and stops collecting statistics for any new application names until the distributed data facility (DDF) is restarted.
  2. Db2 for z/OS traces for IFCID 412, which collect statistics for user IDs, are limited to 6000 unique user IDs. If this limit is exceeded, the Db2 data server issues error DSNL030I with reason code 00D3105E, and stops collecting statistics for any new user IDs until the distributed data facility (DDF) is restarted.

The following table lists the client info property values that the IBM Data Server Driver for JDBC and SQLJ returns for Db2 for z/OS when the connection uses type 2 connectivity.

Table 3. Client info property values for type 2 connectivity on Db2 for z/OS
NAME MAX_LEN (bytes) DEFAULT_VALUE DESCRIPTION
ClientAccountingInformation 255 Empty string. The value of the accounting string from the client information that is specified for the connection. This value is stored in Db2 special register CURRENT CLIENT_ACCTNG.
ApplicationName 255 The string "db2jcc_application". The name of the application that is currently using the connection. This value is stored in Db2 special register CURRENT CLIENT_APPLNAME.1
ClientCorrelationToken 255 An LUWID (Logical Unit of Work ID) that the data server generates. A unique value that allows you to correlate your business processes across the enterprise. This value is stored in Db2 special register CURRENT CLIENT_CORR_TOKEN. The client correlation token value is available in the accounting correlation header record of a Db2 trace, and in the -DISPLAY THREAD command output.
ClientUser 128 The user ID that was specified for the connection. If no user ID was specified, the RACF® user ID is used. The name of the user on whose behalf the application that is using the connection is running. This value is stored in Db2 special register CURRENT CLIENT_USERID.2
ClientHostname 255 The string "RRSAF".

For version 3.68 or 4.18, or later of the IBM Data Server Driver for JDBC and SQLJ, if ClientHostname is set to any value other than an IP address, no value is sent to the data server.

The host name of the computer on which the application that is using the connection is running. This value is stored in Db2 special register CURRENT CLIENT_WRKSTNNAME.
Notes:
  1. Db2 for z/OS traces for IFCID 411 that monitor application names are limited to 6000 unique application names. If this limit is exceeded, the Db2 data server issues error DSNL030I with reason code 00D3105D, and stops collecting statistics for any new application names until the distributed data facility (DDF) is restarted.
  2. Db2 for z/OS traces for IFCID 412 that monitor user IDs are limited to 6000 unique user IDs. If this limit is exceeded, the Db2 data server issues error DSNL030I with reason code 00D3105E, and stops collecting statistics for any new user IDs until the distributed data facility (DDF) is restarted.

The following table lists the client info property values that the IBM Data Server Driver for JDBC and SQLJ returns for IBM Informix®

Table 4. Client info property values for IBM Informix
NAME MAX_LEN (bytes) DEFAULT_VALUE DESCRIPTION
ClientAccountingInformation 199 Empty string The value of the accounting string from the client information that is specified for the connection.
ApplicationName 20 Empty string The name of the application that is currently using the connection.
ClientUser 1024 Empty string The name of the user on whose behalf the application that is using the connection is running.
ClientHostname 20 The host name of the local host.

For versions of the IBM Data Server Driver for JDBC and SQLJ starting with 4.18 or 3.68, if ClientHostname is set to any value other than an IP address, no value is sent to the data server.

The host name of the computer on which the application that is using the connection is running.