IBM data server driver configuration keywords for client information
The IBM® data server driver configuration keywords can be used to provide client information to a database server. The client information is defined by a client application to declare the identity of a client application to a database server.
The list of IBM data
server driver keywords for client information and the corresponding
limit is listed in the table 1. Some database servers might not be
able to handle the entire length of the value and might truncate the
value.
The database servers that support IBM data server driver keywords for client information
are listed in the table-2.
The application that uses the CLI driver
can specify client information through other available methods that
are listed in the table-3.
Keyword name | Size limit | Default value | Applicable sections or subsections in the IBM data server driver configuration file | Description |
---|---|---|---|---|
ClientAccountingString | 255 | None | <database>, <dsn>, or <parameters> |
Sets the client accounting string that is sent to a database. The ClientAccountingString keyword must be set before the start of a transaction. Changes to the ClientAccountingString keyword after the start of a transaction do not take effect until the start of the next transaction. |
ClientApplicationName | 255 | None | <database>, <dsn>, or <parameters> |
Sets the client application name that is sent to a database. You must set the ClientApplicationName keyword before the start of a transaction. Changes to the ClientApplicationName keyword after the start of a transaction do not take effect until the start of the next transaction. |
ClientCorrelationToken | 255 | The DRDA correlation token | <database>, <dsn>, or <parameters> |
Sets the client correlation token that is sent to a Db2 for z/OS Version 11 server in new function mode (NFM). Changes to the ClientCorrelationToken keyword after the start of a transaction do not take effect until the start of the next transaction. |
ClientUserID | 255 |
None | <database>, <dsn>, or <parameters> |
Sets the client user ID (accounting user ID) that is sent to a database. The ClientUserID keyword is for identification purposes only and is not used for any authentication. You must set the ClientUserID keyword before the start of a transaction. Changes to the ClientUserID keyword after the start of a transaction do not take effect until the start of the next transaction. |
ClientWorkstationName | 255 | If the ClientWorkstationName keyword is not specified, the default value that consists of the host name is used. The host name is obtained by calling the gethostname() function. If the host name is not configured or an error is encountered during the gethostname() function call, no value for the ClientWorkstationName keyword is sent to the database server. | <database>, <dsn>, or <parameters> |
Sets the client workstation name that is sent to a database server. You must set the ClientWorkstationName keyword before the start of a transaction. Changes to the ClientWorkstationName keyword after the start of a transaction do not take effect until the start of the next transaction. |
enableDefaultClientInfo | False | <database>, <dsn>, or <parameters> |
Specifies whether the default client information register values, which are set on the Db2 for z/OS server, are returned to the application. |
Keyword name | Db2 | Db2 for z/OS | Db2 for IBM i | Informix® |
---|---|---|---|---|
ClientAccountingString | Yes | Yes | Yes | Yes |
ClientApplicationName | Yes | Yes | Yes | Yes |
ClientCorrelationToken | No | Yes | No | No |
ClientUserID | Yes | Yes | Yes | Yes |
ClientWorkstationName | Yes | Yes | Yes | Yes |
enableDefaultClientInfo | No | Yes | No | No |
Keyword name | Equivalent db2cli.ini keyword | Equivalent environment attribute | Equivalent connection attribute |
---|---|---|---|
ClientAccountingString | ClientAcctStr | SQL_ATTR_INFO_ACCTSTR | SQL_ATTR_INFO_ACCTSTR |
ClientApplicationName | ClientApplName | SQL_ATTR_INFO_APPLNAME | SQL_ATTR_INFO_APPLNAME |
ClientCorrelationToken | ClientCorrelationToken | SQL_ATTR_INFO_CRRTKN | SQL_ATTR_INFO_CRRTKN |
ClientUserID | ClientUserID | SQL_ATTR_INFO_USERID | SQL_ATTR_INFO_USERID |
ClientWorkstationName | ClientWrkStnName | SQL_ATTR_INFO_WRKSTNNAME | SQL_ATTR_INFO_WRKSTNNAME |
enableDefaultClientInfo | None | None | None |
The Db2 for z/OS server
sets the client information register values by default when they are
not explicitly set by the client. The default values that are set
by the Db2 for z/OS Version
11 and later servers are listed in the table-4. The default values
for the client information registers can be retrieved with the SQLGetConnectAttr() and sqleqryi() APIs
only when the enableDefaultClientInfo keyword
is set to True.
Keyword name | Equivalent .NET connection string keyword | Equivalent special register name | Default values set by the Db2 for z/OS server |
---|---|---|---|
ClientAccountingString | ClientAccountingString | CURRENT CLIENT_ACCTNG |
Null string. |
ClientApplicationName | ClientApplicationName | CURRENT CLIENT_APPLNAME |
The current process name. |
ClientCorrelationToken | ClientCorrelationToken | CURRENT CLIENT_CORR_TOKEN |
The DRDA correlation token that is generated during a connection. A database client typically generates the DRDA correlation token value. However, if the database client cannot generate the value, the database server generates the value. |
ClientUserID | ClientUserID | CURRENT CLIENT_USERID |
The user ID that was specified for a connection. |
ClientWorkstationName | ClientWorkstationName | CURRENT CLIENT_WRKSTNNAME |
The host name of the client. |