Connecting to a DB2 database in Compatible mode

Connect Tivoli® Common Reporting to a DB2® database.

Before you begin

User role image Perform this task with the support of a database administrator.

Make sure that you installed the DB2 database client on the computer where Cognos-based Tivoli Common Reporting engine is installed. You can use either the 32-bit or 64-bit client, however, if you decide to use the 64-bit DB2 client, you must use the 32-bit versions of the library files from the directory sqlib/lib32. The version of the client must match the version of your database.

About this task

To configure the database, connect it to a client, and activate the optional cross-database functionality.

Procedure

  1. Edit WebSphere® Application Server scripts to use the setTCRenv script. To do this, append JazzSM_Home/reporting/bin/setTCRenv.sh to the JazzSM_WAS_Profile/bin/setupCmdLine.sh.
  2. Windows icon Linux icon Connect the DB2 database client to the database server by running the Configuration Assistant and configuring the local net service name configuration. For details, see Configuring client-to-server connections in the DB2 information center.
    Important: Note the name of the connection you have created as it is used in one of the following steps.
    Additionally, for non-Windows platforms, the Tivoli Common Reporting must be able to find the local DB2 libraries. To ensure this, check if the DB2 directory containing libraries exists. Then, configure the system library path to point to the database client library directory by modifying the following environment variable:
    • AIX identifier LIBPATH
    • HP-UX identifierSHLIB_PATH
    • Linux identifier Solaris identifierLD_LIBRARY_PATH
    For example, you can modify the setTCRenv.sh script by inserting the following line:
    export LD_LIBRARY_PATH=/opt/IBM/db2/V10.1/lib32:$LD_LIBRARY_PATH
    For non-Windows systems, you might also need to source the DB2 profile in the Tivoli Common Reporting environment before starting the server, for example . /home/db2 user/sqllib/db2profile. You can modify the setTCRenv.sh script by inserting the following line before starting WebSphere Application Server: . /home/db2 user/sqllib/db2profile, where db2 user is your local DB2 user ID.
  3. Restart WebSphere Application Server:
    1. Stop the server by running the JazzSM_WAS_Profile\bin\stopServer server_name command.
    2. Start the server by running the JazzSM_WAS_Profile\bin\startServer server_name command.
    JazzSM_WAS_Profile is the location of Jazz™ for Service Management WebSphere Application Server profile and by default is: /opt/ibm/JazzSM/profiles for UNIX systems and C:\Program Files\IBM\JazzSM\profile for Windows systems. By default, server_name is server1.
  4. Create new database connection for Cognos® by following the steps:
    1. From the Common Reporting portlet, go to Launch expandable list, and choose the Administration.
    2. On the Configuration tab, add a data source by clicking New data source button.
    3. Follow the New Data Source wizard as required noting the following steps:
      • On the second panel, choose a DB2 database as Type and clear the Configure JDBC connection option.
      • On the third panel, specify the name of the connection you noted before as the DB2 database name, and in the Signon section specify User ID and Password for connecting with the database.

Results

You have now connected your Tivoli Common Reporting to a DB2 database instance.