The following strings include the options used to connect using the Kerberos authentication.
Note: The strings demonstrated in this section use the DSN-less format. For additional formats, see "Using a connection string".

For Db2 for Linux, UNIX, and Windows:

DRIVER=DataDirect 8.0 Db2 Wire Protocol;AuthenticationMethod=4;
IPAddress=ip_address;TCPPort=tcp_port;Database=database_name;
GSSClient=gss_client_library;[attribute=value[;...]];

For Db2 for z/OS:

DRIVER=DataDirect 8.0 Db2 Wire Protocol;AuthenticationMethod=4;
IPAddress=ip_address;TCPPort=tcp_port;Location=location_name;
Collection=collection_name;GSSClient=gss_client_library;
[attribute=value[;...]];

where:

ip_address

specifies the host name or the IP address of the machine where catalog tables are stored.

tcp_port

specifies the port number that is assigned to the Db2 DRDA listener process on the server host machine. The default value is 50000.

database_name

specifies the name of the database to which you want to connect. Valid only on Db2 for Linux, UNIX, and Windows.

collection_name

specifies the current collection or library. Valid only on Db2 for z/OS.

location_name

specifies the name of the Db2 location that you want to access. Valid only on Db2 for z/OS.

gss_client_library

specifies the name of the GSS client library that the driver uses to communicate with the Key Distribution Center (KDC).

attribute=value

specifies connection option settings. Multiple connection option attributes are separated by a semi-colon.

The following example connection string includes the options required for connecting to Db2 for Linux, UNIX, and Windows using the Kerberos authentication.

DRIVER=DataDirect 8.0 Db2 Wire Protocol;AuthenticationMethod=4;
IPAddress=123.456.78.90;TCPPort=50000;Database=Payroll;GSSClient=gss123;