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
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.
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.
ClientHostname 255 The host name of the local host.

Start of changeFor version 3.68 or 4.18, or later of the IBM Data Server Driver for JDBC and SQLJ, if ClientHostname is set to 'NODEFAULT', no value is sent to the data server.End of change

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.
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.

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
ApplicationName 32 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.
ClientAccountingInformation 200 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.
ClientHostname 18 The string "db2jcc_local".

Start of changeFor version 3.68 or 4.18, or later of the IBM Data Server Driver for JDBC and SQLJ, if ClientHostname is set to 'NODEFAULT', no value is sent to the data server.End of change

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.
ClientUser 16 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.

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
ApplicationName 32 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.
ClientAccountingInformation 22 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.
ClientHostname 18 The string "RRSAF".

Start of changeFor version 3.68 or 4.18, or later of the IBM Data Server Driver for JDBC and SQLJ, if ClientHostname is set to 'NODEFAULT', no value is sent to the data server.End of change

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.
ClientUser 16 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.

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
ApplicationName 20 Empty string The name of the application that is currently using the connection.
ClientAccountingInformation 199 Empty string The value of the accounting string from the client information that is specified for the connection.
ClientHostname 20 The host name of the local host.

Start of changeFor version 3.68 or 4.18, or later of the IBM Data Server Driver for JDBC and SQLJ, if ClientHostname is set to 'NODEFAULT', no value is sent to the data server.End of change

The host name of the computer on which the application that is using the connection is running.
ClientUser 1024 Empty string The name of the user on whose behalf the application that is using the connection is running.