To access Db2® databases from InfoSphere® Information Server, you must configure Db2 environment variables and set the privileges for Db2 users. The Db2 connector connects to your databases by using the Db2 client on the InfoSphere
DataStage® nodes.
Before you begin
- Confirm that your system meets the system requirements for InfoSphere Information Server.
Make sure that you are using a supported version of IBM® Db2.
For more information about system requirements, see http://www.ibm.com/software/data/infosphere/info-server/overview/.
- Install the IBM Db2 client on all InfoSphere
DataStage nodes,
and make sure that the client is working correctly.
- Use the Db2 Configuration Assistant to test the Db2 client and server connection. If the Db2 client fails to connect to the Db2 server, jobs that use the Db2 Connector stage also fail.
- Catalog each database in the Db2 client. Starting from
version 11.7.1.3, there is an alternative way of setting up DB2 Connector. For more information, see
Configuring the Db2 connector.
- InfoSphere
DataStage runs many processes for each job. Ensure that Db2 resources, configuration parameters, and manager configuration parameters are configured properly.
- If you plan to use the Db2 connector with Db2 for z/OS® in jobs with sparsely arriving data (such as jobs that use the Change Data Capture stage), ensure that the idle timeout value set in the Db2 IDTHTION subsystem parameter is longer than the longest expected interval of inactivity for the Db2 Connector stages in the job.
Procedure
- Grant the InfoSphere
DataStage users
SELECT privileges on the following tables:
Table 1. Required
SELECT privileges
| Db2 product |
Tables that require SELECT privileges |
| Db2 and Db2
on ClouddashDB® |
- SYSCAT.COLUMNS
- SYSCAT.KEYCOLUSE
- SYSCAT.TABCONST
- SYSCAT.TABLES
- SYSIBM.SYSDBAUTH
|
| Db2 for z/OS |
Note: Before the data is loaded to data to Db2 for z/OS, make sure the user has the GRANT ALL access on SYSIBM.SYSPRINT:
- SYSIBM.SYSCOLUMNS
- SYSIBM.SYSINDEXES
- SYSIBM.SYSKEYCOLUSE
- SYSIBM.SYSKEYS
- SYSIBM.SYSPRINT
- SYSIBM.SYSTABLESPACE
- SYSIBM.SYSTABLES
- SYSIBM.SYSTABLEPART
- SYSIBM.SYSUSERAUTH
|
| Db2 for z/OS and Db2 on Cloud |
- SYSIBM.SYSDUMMY1
- SYSIBM.SYSVIEWS
|
- On Db2 for z/OS, ensure that the DBA runs the DSNTIJSG installation job to install the DSNUTILS stored
procedure. The DSNUTILS stored procedure is required to start the bulk loader on Db2 for z/OS. For more information, see http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db2z9.doc.inst/src/tpc/db2z_enabledb2supplstprocs.htm
- Set the DB2INSTANCE environment variable to the instance in the Db2 client in which you cataloged the target database.
You must set the
DB2INSTANCE environment
variable even if the stage accesses the default Db2 instance. The instance that is specified
in the
DB2INSTANCE environment variable becomes the default instance that is used by the connector. If you want to use a Db2 instance other than the default, then enter the name of that instance in the
Instance property of the Db2 connector in the
Properties tab. The Db2 client installs the default instances.
Table 2. Default instance installed by the Db2 client
| Operating System |
Db2 Instance |
| Linux or UNIX |
db2inst1 |
| Microsoft Windows |
Db2 |
- Add the path to the directory that contains the client
libraries to the library path environment variable.
The
default path for client libraries is shown in the table.
Table 3. Default path for Db2 client libraries
| Operating System |
Db2 Instance |
| Linux or UNIX |
/opt/IBM/db2/V9/lib64 |
| Microsoft Windows |
C:\IBM\SQLLIB\BIN |
Note: The Db2 Client Library File property must contain the file name of the client library as a fully qualified path when the path to the client library is not added to the library path environment variable. Else, just add the file name if the path already exists.
- Optional:
If the globalization map name for the Db2 connector job
does not match the current system locale on the engine tier, then set the
DB2CODEPAGE environment variable to a code page corresponding to the map
name.
The Db2 code page can also be set by using a Db2 registry variable.