To create and configure data source entries for DRDA, edit the odbc.ini file using the attributes in each of these categories, or sections:
General, which defines connectivity parameters
Advanced, which contains optional fields that affect performance and use of resources
Bind, which defines parameters for package creation in the DB2 system
Each of these sections is delimited with comments.
As you edit the odbc.ini file, be sure you have the following parameters available on your worksheet. For all others, you can accept the default or provide a value appropriate for your site.
Table C-1 contains the General parameters; the required parameters are indicated by an asterisk (*).
Parameter |
Comments |
---|---|
*Driver |
The fully qualified path to the driver. |
*Ip address |
The IP (Internet Protocol) address of the machine where the catalog tables are stored. Specify the address using the machine's numeric address (for example, 123.456.78.90) or its host name. WARNING! For Solaris systems, use the numeric IP address, not the host name. If you enter a host name, the driver must find this name (with the correct address assignment) in the HOSTS file on the workstation or in a DSN server. |
*TcpPort |
The port number that is assigned to the DB2 server on the machine where the catalog tables are stored. Specify either this port's numeric address or its service name. The default numeric port address varies, depending on the OS of the DB2 server machine. For DB2, the default may be 50000. For AS/400, the default is 446. If you specify a service name, the driver must find this name (with the correct port assignment) in the SERVICES file on the workstation. |
*Location (Required for DB2 UDB on AS/400 and z/OS only) |
This field is valid only if you are connecting to a DB2 database running on z/OS or AS/400. Type the DB2 location name, using the name defined during the local DB2 installation.
|
*Collection (Required for DB2 UDB on AS/400 and z/OS only) |
A field that is valid only if you are connecting to a DB2 database running on z/OS or AS/400. Enter the name that identifies a group of packages that include the ECDA DC DB2 DRDA driver packages. The default for DB2 and AS/400 is the user ID.
|
*Database (Required for connecting to DB2 on Windows and UNIX) |
The name of the database to which you want to connect to, by default.
|
*IANAAppCodePage (Required for UNIX platforms) |
A driver code page configuration property for the DB2 UDB driver, for example, 3, 4, 2004, and 2250. Find a complete list of the values and their descriptions, see IANA. |
WorkArounds2 |
The name of the string key to allow the driver to pad the DB2 Char for Bit Data field with spaces. The value is 131072. |
After entering these parameters, use the odbct tool (see Chapter 10, “Troubleshooting Installation”) to test connectivity to the DB2 UDB source.
Table C-2 shows the default values for the Advanced parameters that should be sufficient for most DB2 UDB installations.
Parameter |
Comments |
---|---|
AlternateID |
A value that is substituted at connect time for the current schema. This sets the default qualifier for unqualified object names in SQL statements. If the attempt to change the current schema fails, the connection fails with "Invalid value for Alternate ID." DB2 permissions should be set to SYSADM. (Not valid for AS/400 V5R1.) |
WithHold |
The cursor behavior for the application used with this data source—either DB2 closes all open cursors (Delete cursors) after a commit or rollback, or leaves them open (Preserve cursors).
|
AddStringToCreate Table |
Use this parameter if you want to append the in tablespace clause to create table commands. |
Table C-3 contains the Bind parameters, with the required parameters, indicated by an asterisk (*).
Parameters |
Comments |
---|---|
*GrantExecute |
An indicator to grant privileges on the package that you are creating. |
*GrantAuthid |
The ID of the person to whom the GrantExecute privileges were assigned. The default value is Grant Execute privileges on the package to PUBLIC. |
*IsolationLevel |
The Isolation Level method by which locks are acquired and released by the system. Valid values are:
|
*DynamicSections |
The number of statements that the DB2 Wire Protocol driver package can prepare for a single user. The default is 64. This value determines the maximum cursors or dynamic statements that a single connection can have open simultaneously. |
For version 15.0, packages are created automatically
on the initial connection to the DB2 UDB server. The Bind utility
is only needed to modify the package settings.
Use the bind20 utility included in the bin subdirectory to create packages. The bind20 utility will use the bind options defined in your DRDA DSN to configure the package and grant proper ownership. The bind20 syntax is:
bind20 db2-dsn
This utility prompts for a DB2 user ID and password, creates the packages, and then reports a final status.
A separate package is not needed for each DRDA access service; however, if an access service has different characteristics in its parameters that suit it for a specific solution, you can create other packages for other solutions.
The examples in the next sections identify the DSN parameters required and used for DRDA to the following targets:
DB2 UDB on AS/400
DB2 UDB on Windows
DB2 UDB on UNIX