You can run your Cognos® reports against data in
the cloud rather than the data in an on-premises database. After you load your data to the Db2 database, you set up the JDBC driver, and then
use the Cognos administration tools to create the database
connection. These instructions explain how to connect to the database from Cognos version 10.2.1.
Procedure
To connect to the database from your Cognos
server, you need the db2jcc.jar file. The db2jcc.jar file
is part of the Db2 driver package, which you can download from the web console. The same file is available in the Windows or the Linux® download.
Important: If the Db2 driver package or
the IBM® Data Server Driver Package is already installed on your computer, do not
install it again.
-
Download the Db2 driver package from the
web console.
- The Windows package is an executable file that installs
multiple drivers on your computer.
- The Linux package contains the
db2jcc.jar file within compressed files. You can use the Linux package to access the db2jcc.jar file on a Windows computer too. You will need a decompress utility, such
as 7-Zip.
- Locate the db2jcc.jar file:
- Windows: After you run
the ibm_data_server_driver_package_win64_v10.5.exe file,
the db2jcc.jar file is installed in the C:\Program
Files\IBM\IBM DATA SERVER DRIVER\java directory.
- Linux: Decompress the ibm_data_server_driver_package_linuxx64_v10.5.tar.gz file,
and then decompress the ibm_data_server_driver_package_linuxx64_v10.5.tar file.
Go to the dsdriver\jdbc_sqlj_driver\linuxamd64 subdirectory.
Decompress the db2_db2driver_for_jdbc_sqlj.zip file
to access the db2jcc.jar file.
- Copy the db2jcc.jar file to the c10_location\webapps\p2pd\WEB-INF\lib directory
on your Cognos Content Manager
computer.
Follow these steps to connect the Cognos
server to the Db2 database, BLUDB:
-
Collect connect information and credentials.
- On your Cognos server,
start IBM Cognos Administration. Use one of the following
methods:
- In the Welcome page, click Administer
IBM Cognos Content.
- In IBM Cognos Connection, from the toolbar, click .
- From the Configuration tab, select Data
Source Connections.
- Click the new data source icon . The New Data Source wizard opens.
- In the "Specify a name and description"
page, enter a unique name for the BLUDB data source and an optional
description and screen tip. Click Next.
- In the "Specify the connection" page,
select IBM DB2 for the type and specify the
isolation level. Ensure that Configure JDBC connection
is selected, and then click Next.
- In the "Specify the IBM DB2 connection string"
page, use the following parameters:
- Enter BLUDB in the DB2
database name field.
- Ensure that the Signons radio
button is selected, and then select the two check boxes for Password and Create
a signon that the Everyone group can use. Use the user
ID and password that you obtained in step 4. Click Finish.
- On the "Specify the IBM DB2 (JDBC) connection
string" page, specify the server name and port number that
you obtained in step 4.
The database name is BLUDB.
- Click Test the connection, then
click Test. On the "View the results"
page, the status of the connection tests for the dynamic query mode
should be Succeed. Click Finish.
Results
Your Cognos server is now connected to the Db2 database. Use your Cognos tools to create dynamic cubes and start generating reports. Following
are resources from the Cognos documentation: