Configuring the Streams database adapter for DB2

This procedure is necessary only if you plan to use a DB2 database.

Procedure

  1. On the machine where the Streams server is installed, edit the Streamsadmin user's /home/streamsadmin/.bashrc file to add the following environment variable commands.
    Table 1. Environment variables for DB2 on Streams
    Environment variable Example value
    Variables for compiling Streams adapters with DB2
    STREAMS_ADAPTERS_ODBC_DB2 True
    STREAMS_ADAPTERS_ODBC_INCPATH <DB2 Home>/sqllib/include/
    STREAMS_ADAPTERS_ODBC_LIBPATH <DB2 Home>/sqllib/lib64
    Variable for running Streams adapters with DB2
    DB2INSTANCE myDB2InstanceName
  2. To test your configuration, run the following command as the streamsadmin user.

    Use the DB2 instance name, user name, and password appropriate for your environment.

    isql DB2_instance_name user_name password

    If the test fails, check your execution of the preceding steps. Remember that names are case-sensitive.

    If the DB2 environment variables are not set correctly and the DB2 command line client does not work, you must source the /home/db2inst1/sqllib/db2profile script in the .bashrc script to initialize DB2 environment variables correctly.