IBM Support

Resolving DB2 Connection Errors in Compatible Query Mode

Technote (troubleshooting)


Problem(Abstract)

If the DB2 connection is not properly configured any attempt to establish a connection to this data source will fail. The error message that is returned can be a result of several factors listed below.

Symptom

On Windows the message will be listed as:

QE-DEF-0285 Logon failure.
QE-DEF-0285 Logon failure.
QE-DEF-0325 The cause of the logon failure is:
QE-DEF-0068 Unable to connect to at least one database during a multi-database attach to 1 database(s) in:
testDataSourceConnection
UDA-SQL-0432 Unable to locate the gateway "cogudad2"

On UNIX systems the message will be reported as:

QE-DEF-0285 Logon failure.
QE-DEF-0285 Logon failure.
QE-DEF-0325 The cause of the logon failure is:
QE-DEF-0068 Unable to connect to at least one database during a multi-database attach to 1 database(s) in:
testDataSourceConnection
UDA-SQL-0432 Unable to locate the gateway "libcogudad2"


Resolving the problem

The connection failure can occur for several reasons. Review the items listed below to identify the scenario that applies within your environment.

  1. To use a connection to a DB2 data source in Compatible Query Mode the appropriate database client software is required on each of the systems that will reference the data source. This also includes systems which are used to run Framework Manager. Framework Manager will retrieve the connection string from the Content Manager server and then attempt to establish a local connection using this connection string. Refer to the supported environments page to identify the supported client driver for your database version.
    http://www-969.ibm.com/software/reports/compatibility/clarity/index.jsp
  2. Ensure that the environment variables for the system are configured to access the DB2 client and that the account used to execute the Cognos product has sufficient rights to access these files. For full details on configuration requirements please refer to your DB2 documentation. As a quick reference:

    PATH
    : Include the location of the bin directory located within the DB2 client installation.

    UNIX library path references:
    Solaris, Linux
    : LD_LIBRARY_PATH (ex. LD_LIBRARY_PATH=db2_install_directory/sqllib/lib)
    HPUX
    : SHLIB_PATH
    AIX
    : LIBPATH

    /!\ If a 3rd party application server (such as WebSphere , WebLogic , Oracle Application Server , SAP NetWeaver , or JBOSS ) is being used for your Cognos environment then it may also be necessary to review the startup scripts and configuration settings of your application server to ensure that the path settings to access the DB2 client libraries are not being reset by startup scripts or defined incorrectly within the 3rd party products. Refer to your application server documentation for details on identifying custom environment settings.

    On Windows the 3rd party tools, Dependency Walker, RegMon, and FileMon (RegMon and FileMon are available from SysInternals) can assist in identifying missing or inaccessible files. Dependency Walker can be attached to cogudad2.dll (located in the Cognos bin directory) to identify any inaccessible libraries required for establishing the connection.

    On UNIX the ldd command can be used to identify the dependencies of the libcogudaor library (located in the Cognos bin directory).

    ldd libcogudad2.(so|a|o)** -- Solaris, HPUX and AIX (depending which utility is installed)
    ** File extensions depend on operating system.
    dump -H libcogudad2.so -- AIX

    Note also that the DB2 client software may be available in both 32-bit and 64-bit versions. Ensure that the library paths are set to reference the 32-bit DB2 client libraries.

    Using these trace utilities will also identify scenarios where the libraries are being sourced from a location other than the expected DB2 bin directory (i.e. other software or other DB2 client installations may be identified in the system PATH environment variable and are being sourced inappropriately for the required libraries)

    Changes to the environment should be followed by a restart of the Cognos product to pick up the updated settings.
  3. If the database being used within Cognos is DB2/400/DB2 iSeries via iSeries Access for Windows then the connection must be established by using the ODBC connection type within Cognos. The Client Access driver is an ODBC driver rather than the Native DB2 client available for other versions of DB2. To set up this ODBC connection:
    1. Create a new datasource within Cognos and select "ODBC" as the type and click "OK":
    2. In the "ODBC data source field" on the following screen, enter the ODBC DSN for the DB2/400 database.
      This is the data source alias rather than the server name of the DB2/400 instance.
    3. If necessary, enter the User ID & Password to be used with the ODBC datasource.
    4. Click "Test the connection" and then the "Test" button. The message "Succeeded" should appear.
    5. Click "Close" twice, and then click "Finish".
  4. Ensure that the DB2 Alias is fully configured within the DB2 client configuration. The db2clp (command line processor) can be used to test connections outside of Cognos products. If connections cannot be established through db2clp then these issues should be resolve before attempting changes within Cognos products.

    Refer to your DB2 product documentation for information on how to install and configure the DB2 client software to establish connections to your database instance.
  5. For Native connections to DB2, verify that the DB2 Alias is being used in the Cognos "database name" field rather than the database server name.

Document information

More support for: Cognos Business Intelligence
Cognos Connection

Software version: 10.2, 10.2.1, 10.2.2

Operating system(s): AIX, Solaris, Windows

Reference #: 1367693

Modified date: 19 January 2017


Translate this page: