User ID/password authentication
- Last Updated: April 13, 2022
- 2 minute read
- DataDirect Connectors
- ODBC
- IBM Db2 8.0
- Documentation
The following strings include the options used to connect using user ID/password (no encryption) authentication.
1 (Encrypt Password),
2 (Encrypt UID and Password), 7 (Encrypted Password
AES), and 8 (Encrypted UID and Password AES). See "Authentication Method"
for details.For Db2 for Linux, UNIX, and Windows; Db2 Hosted; and Db2 Warehouse on Cloud:
DRIVER=DataDirect 8.0 Db2 Wire Protocol;IPAddress=ip_address;TCPPort=tcp_port;
Database=database_name;LogonID=user_name;Password=password;
[attribute=value[;...]];
For Db2 for z/OS and iSeries:
DRIVER=DataDirect 8.0 Db2 Wire Protocol;IPAddress=ip_address;TCPPort=tcp_port;
Location=location_name;Collection=collection_name;LogonID=user_name;Password=password;
[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 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; Db2 Hosted; and Db2 Warehouse on Cloud.
- location_name
-
specifies the name of the Db2 location that you want to access. Valid only on Db2 for z/OS and Db2 for i.
- collection_name
-
specifies the current collection or library. Valid only on Db2 for z/OS and Db2 for i.
- user_name
-
specifies your username.
- password
-
specifies your password.
- 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 user ID/password (no encryption) authentication.
DRIVER=DataDirect 8.0 Db2 Wire Protocol;IPAddress=localhost;TCPPort=50000;
Database=db2data;LogonID=jsmith;Password=secret;