In this section: How to: |
The Adapter for DB2 minimally requires the installation of the DB2 Client for the CLI type adapter or the DB2 load library for the CAF adapter. The DB2 Client allows you to connect to a local or remote DB2 data source server.
For the server running in the z/OS environment using the CLI interface FMID JDB7717, the DB2 component must be installed on the MVS system.
On Microsoft Windows, the DB2 environment is set up during the installation of DB2.
The adapter supports Unicode data in DB2 version 8 or higher databases created with the option CODESET UTF-8. You must add DB2CODEPAGE=1208 to the Windows environment either by:
DB2CODEPAGE=1208
For IBM i: To connect to the IBM i platform (formerly known as i5/OS) using the Adapter for DB2, you must use the IBM DB2 connect client. You must also set DB2CODEPAGE 1208 on the Windows platform (regardless of whether you are using Unicode data). This setting ensures proper communication with the DB2 catalog. Without it, you will receive errors when accessing the DB2 catalog (for example, when creating a synonym).
Note that the setting only affects synonym creation. Existing synonyms can be used for reporting regardless of this setting.
To set up the Adapter for a DB2 environment on UNIX, do all of the following:
DB2INSTANCE=db2 export DB2INSTANCE
INSTHOME=/usr/db2710 export INSTHOME
LD_LIBRARY_PATH=$INSTHOME/sqllib/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH
Note that if the server is running with security on, the LD_LIBRARY_PATH variable is ignored. In this case, you must use IBI_LIBPATH.
export LANG=EN_US.UTF-8
Two types of Adapters for DB2 are available in this environment. Each one requires different pre-configuration steps prior to using the Web Console.
For the naming convention for the configuration data set, see the installation manual for z/OS.
The adapter makes use of the DB2 plan DSNACLI. To ensure that all users of the adapter have access to this plan, issue the following command in the DB2 environment:
GRANT EXECUTE ON PLAN DSNACLI TO PUBLIC
The adapter also uses the DSNAOINI environment variable to point to the full path and file name of the DB2 CLI .ini file. You can provide this variable at installation time using the ISETUP panels, or you can add it to the EDAENV member of the installation data set. The format is:
DSNAOINI=full_path_name/db2cli.ini
Unicode support. The adapter supports Unicode data in DB2 version 8 or higher databases that have been created with the CCSID UNICODE option. You must ensure that the DSNAOINI environment variable points to a configuration file containing the following specification:
CURRENTAPPENSCH=UNICODE
To create tables with one-part names, a CURLIB must be set. Thereafter, the location can be anywhere in the library path. The first table found is the one used.
Using the standard rules for deploying the DB2 Client, the server supports connections to:
When using DB2/CLI to connect to a remote DB2 data source, the DB2 client catalog must contain an entry for the node where the remote data source resides and an entry for the remote database name.
Support for Remote Aliases. An alias entry in a local DB2 system that points to a table in another DB2 system is only supported with the CREATE SYNONYM command. It is not supported for metadata queries when SET ENGINE=DB2 is in effect.
Read/write applications accessing DB2 data sources are able to perform transactions managed in XA-compliant mode.
To activate the XA Transaction Management feature, the server has to be configured in Transaction Coordination Mode, using the Web console configuration functions. Using Transaction Coordination Mode guarantees the integrity of data modification on all of the involved DBMSs and protects part of the data modifications from being committed on one DBMS and terminated on another.
Note that on DB2 v8, support for XA in 64bit DB2 requires the installation of Fix Pack 13.
For complete documentation on XA compliance, see XA Support.
iWay Software |