Passing IBM Cognos Context to a Database
They use this information for auditing, workload management, and troubleshooting. IBM® Cognos® software can provide details about its reporting applications and the users accessing them.
These details include the default set of information about authenticated users that is retrieved from authentication providers. This information can be extended by specifying custom namespace mappings in IBM Cognos Configuration. For more information about the mappings, see the Installation and Configuration Guide.
Using the mechanisms built into your database and IBM Cognos software, you can implement the most appropriate methods of passing Cognos context to the database. These methods include:
- Using IBM Cognos command blocks, see Using Command Blocks
This method applies to all databases that support command blocks, specifically Oracle, DB2, Microsoft SQL Server, and Teradata data sources
- Using DB2 CLI
connection
attributes, see Using DB2 CLI Connection Attributes for DB2
This method applies to DB2 only.
- Adding application context to dynamic SQL, see Using DB2 CLI Connection Attributes for DB2
This method applies to all database applications that support comments within a dynamic SQL statement.
Support for Macro Functions
The macro functions available in IBM Cognos software can provide information in a command block about users and reporting application objects, such as packages, reports, or queries. All macro functions can return values when referenced from a command block, which allows for application context to be passed to the database from a command block. Macro functions that reference parameter maps in a model may also be used.