Part 3 of 5 in a series on our Cognos Analytics 11.2.4 to 12.1.3 upgrade. Previous part: Running several Cognos Analytics 12 instances on one Linux host with Podman: A Complete Guide
The content store and the reporting data are different databases. Mixing them up is how a restore puts yesterday's data-source passwords back, or how a report runs and returns nothing. This is the split we use on Cognos Analytics 12.1.3, and the traps in a full content-store export.
Why
Cognos Configuration wants a content store before the portal exists. The reports want a warehouse. On DB2 those were often two databases already. On PostgreSQL they stay two databases, each in its own Podman container, each on its own port. The third one is audit.
The goal
- A content store Cognos can open on PostgreSQL.
- Reporting data that the old reports can still query.
- A way to copy the content store from one environment to another without losing the JDBC URLs you just fixed.
Architecture, in one line
Content store database on one port, reporting database on a second, audit database on a third. Cognos on the application host connects to a host alias (<db-host-alias>) and the port. The JDBC URL for reporting data ends with currentSchema= set to the compatibility schema.
Prerequisites
- PostgreSQL 13 or newer. We measured this on 18.x.
- A content-store user that can create the Cognos schema.
- The reporting schema loaded before you point Cognos at it. An empty warehouse produces an empty compatibility layer and no error.
- A Cognos deployment export of the whole content store, taken while the source environment is quiet enough that you know which zip you are importing.
Part 1: What we had to sort out
1. Three databases, three ports
| Database |
Role |
Port |
| Content store |
Reports, packages, data sources, groups |
<cs-port> |
| Reporting data |
The warehouse the reports query |
<data-port> |
| Audit |
Cognos audit logging |
<audit-port> |
The content-store schema name follows the environment. The container is only the content store. It holds no business facts.
If the content-store container is stopped, the application JVMs can still answer HTTP and Cognos Configuration fails with CM-SYS-5003 (unable to connect to the content store). That outage is the database, not a broken Cognos install. Start the content-store container before you reinstall anything.
2. The content store does not migrate itself when you change the warehouse
We stood up a new PostgreSQL content store and moved Cognos objects with a full content-store deployment export, then an import on the target. The zip is the whole store: packages, reports, data sources, and every export-deployment object that lived in the source.
On the target, an import fails when an import deployment already uses the same name as an exportDeployment inside that archive. Rename the import deployment on the target so it does not collide with any export name packed in the zip. We hit this moving a full backup from one environment into another.
Our deployment script always takes a full content-store backup before a package deploy. A restore flag imports that zip back. If someone runs the restore, data sources included, you are back to the snapshot in the zip. Check the administration history for which archive was imported before you debug a JDBC URL you thought you had changed.
3. After the import, fix the data sources
The import brings the old connection strings with it. On DB2 those pointed at a DB2 port and a DB2 database name. After the import we opened each data source and set the PostgreSQL URL. Audit is a separate data source and a separate database. Do not point audit at the warehouse.
Our reporting URL looks like this, wrapped only for the page:
^User ID:^?Password:;LOCAL;JDBC;
URL=jdbc:postgresql://<db-host-alias>:<data-port>/<reporting-db>;
DRIVER_NAME=org.postgresql.Driver;
ibmcognos.subcode=POSTGRES;
currentSchema=<compat-schema>;
<db-host-alias> is an alias in /etc/hosts on the Cognos application server. The string can look right and still fail when that alias is missing.
currentSchema is what puts the compatibility schema on the PostgreSQL search path. We have no database-level search path. Without this parameter, locate and the uppercase views exist and Cognos still does not see them.
Test the data source in the portal before you trust Framework Manager.
4. The compatibility schema holds no data
The warehouse stays in its own schema, owned by the team that loads it. In front of it we build a schema of views and functions:
- uppercase views, so the old names still resolve
- lowercase aliases, for SQL that emits unquoted names
year, month, locate, nvl
- equality operators between small integers and varchar, where we still need the DB2 implicit cast
- one row in
SYSDUMMY1, because reports still say SYSIBM.SYSDUMMY1
Roughly 1,200 views and two dozen functions on our estate. Re-run the generator when the warehouse gains a table. Cognos will not see the new table until you do. Dropping this schema drops no facts.
5. Encrypted passwords
Saving Cognos Configuration on 12.1 encrypts the content-store password into cogstartup.xml. An upgraded tree often rejects the ciphertext from 11.2. Export the configuration before the upgrade, or type the password again and save. Our start script copies a known-good unencrypted cogstartup.xml into place and lets Cognos encrypt it on save.
A content-store login check runs at the end of start. Connection test failed or Schema access test failed in that log means the portal will not come up, even though Podman shows the container running.
6. Empty reports after a perfect database
Headers, no rows, no error. On our reports that was row-level security: a set of filter tables joined to the Cognos user id. A user with no rows there sees an empty report. Insert the test user into those tables. Do not rebuild the compatibility schema for this symptom. Anything that throws an error is a different problem.
Part 2: Order we actually use
Step 1. Create the three PostgreSQL databases. Note the ports. Put <db-host-alias> on the application server.
Step 2. Create the content-store database and schema. Point Cognos Configuration at it. Save. Confirm the connection test. Start Cognos and wait for DPR-SYS-6000.
Step 3. Load the warehouse. Then build the compatibility schema on top. It reads the warehouse catalog to decide which views to create. An empty warehouse makes an empty compatibility schema.
Step 4. Export the full content store from the source. On the target, import it under a deployment name that does not match any exportDeployment inside the zip.
Step 5. Open the data sources. Set the PostgreSQL JDBC URL and currentSchema. Test each one in the portal.
Step 6. Run one report with prompts you know have rows. If you get headers and zero rows, check the security filter tables for that user before you touch SQL.
Step 7. Take a fresh full content-store backup once the data sources are correct. The next restore should be this zip, not the one from before the JDBC change.
-------------------------------------------------------
Anand kushwaha
https://www.linkedin.com/in/anandkushwaha064/
Senior Software Engineer
AMVARA CONSULTING S.L.
Barcelona
-------------------------------------------------------