IBM Support

Connecting to PostgreSQL from IBM Cognos 10.2.1

Question & Answer


Question

How to connect to PostgreSQL datasource from IBM Cognos 10.2.1?

Answer

Before making the datasource connection in IBM Cognos Administration you will need to make sure that you have installed the 32 bit PostgreSQL ODBC driver.
Once this is complete you will need to download the necesary PostrgeSQL JDBC driver file from the PostgreSQL Site then copy that to the <cognos_install>\webapps\p2pd\WEB-INF\lib and <cognos_install>\v5dataserver\lib directory on all dispatchers, the file is below:

postgresql-9.4-1201.jdbc4.jar

Once the files have been copied over the IBM Cognos environment will need to be restarted.
To use Classic Query mode you will need to setup an ODBC connection, to do so, simply go to the C:\Windows\SysWOW64 directory on your server and launch the odbcad32.exe by right clicking and run as admin. Go to the System DSN tab and select add, then select PostgreSQL Unicode as the type and fill in the connection info and test it to make sure it works.
Once this is finished you can access Cognos and create an ODBC datasource connection.

For Dynamic Query Mode go to IBM Cognos Administration and to the Configuration tab, then to the Datasources section and create a new datasource. The type for the datasource is JDBC, once you get to the connection page you will select Postgres from the drop down menu at the top and put in the JDBC connection string, similar to the format below:

jdbc:postgresql://<host>:<port>/<database-name>

If authentication is required you will need to fill in that information and then test the datasource connection to confirm it successfully connects.

[{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Cognos Administration","Platform":[{"code":"PF033","label":"Windows"}],"Version":"10.2.2;10.2.1;10.2","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 June 2018

UID

swg21960854