DB2 Version 9.7 for Linux, UNIX, and Windows

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

Table 1. Client info property values for DB2 for Linux, UNIX, and Windows and for DB2 for 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. 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 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.
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.
ClientHostname   The string "db2jcc_local" 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   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   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   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   The string "RRSAF". 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   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. 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.