Inside Cognos Connection a data source test to Oracle database, you get error on the DQM

Product:
Cognos BI 10.1.1 (64 bit installation)
Windows 2008 R2 Server (64 bit server)
Oracle 11g on Linux server
Oracle client version 11.2.0.1.0
Java jre version 1.6

Symptom:
Inside Cognos Connection you test a data source to Oracle database, you get error on the DQM (dynamic query mode JDBC ) connection, but the CQM (compatible query mode Native Client) works fine.

Error message:
XQE-GEN-0002 An unexpected exception occurred: ocijdbc11 (F:/Program Files/ibm/cognos/c10_64/bin64\ocijdbc11.dll is not a valid Win32 application. )

Cause:
The path is pointing to the wrong folder containing the wrong oracle client files.

Solution:
Install both Oracle 64 bit client and Oracle 32 bit client, on the Cognos BI server.
Update then Windows PATH to include the Oracle client folders.

Ensure that path is first to the Oracle 64 bit client,
c:\oracle\instantclient11g\
there ocijdbc11.dll file is 135 Kb in size

Ensure second path is to the Oracle 32 bit client,
c:\oracle\instantclient11g\bin
there ocijdbc11.dll file is 100 Kb in size

Ensure that you have put the ocijdbc11.dll with size 135 Kb in the c:\program files\ibm\cognos\c10_64\bin64 folder.

Ensure that you have put the ojdbc6.jar with size 2102 Kb in the c:\program files\ibm\cognos\c10_64\v5dataserver\lib folder.

You need to restart the SERVER to make the changes take affect.

More information:
You can download the Oracle client from here:

http://www.oracle.com/technetwork/database/enterprise-edition/downloads/112010-win64soft-094461.html

Cognos DQM uses 64 bit database drivers, and Cognos CQM uses 32 bit database drivers. If you want both to work, you need to have both version of database drivers on the Cognos BI server.

www.cogknowhow.com