简体   繁体   中英

How to access the data base behind IBM Cognos Report Studio

We are using the IBM Cognos Report Studio for Making the Reports. And we have 1000s of reports developed and using. Now i need to fetch all the SQL queries written in these 1000+ reports. For that at present i am opening the report studio for each individual report and getting the query. But it is very tedious job and taking months to get all the SQLs in these 1000+ reports.

So i am looking for a way to get all these queries from database behind Cognos studio. Does these report parameters (including the SQL) store in a Database or only in Contentstore? If it store in DB then is it possible to access the Report Studio in a Database tool like Oracle SQL Developer? So that i can fetch all the SQLs in one shot from the database table.

Thanks for the help!

My experience migrating from one reporting product to another is like what you are asking. I think I had 7000 reports that I was aware of plus many reports sitting on workstation hard drives. At some point along the way we realized that the new product had different features than the old one, so report redesign was a good option in most cases. It took 18 months once we actually started working on the reports. That was to replace the 700 "standard" reports. Users were on their own (with support from IT and subject matter experts) for their custom work. I now have about 19,000 reports in Cognos.

Except where the report developer wrote SQL in a SQL object in the Queries area, Cognos reports do not contain SQL code. Cognos generates the SQL at runtime based on the report spec and user interaction (what parameters they set, what page the opened, etc.). Short of writing your own report spec parser, duplicating the work that Cognos does for you, there is no way I know of to generate the SQL.

One possibility: I haven't dug too deeply into the Cognos SDK. There may be a method there to generate the SQL for each report. Then you can do it automatically. Be aware that for thousands of reports you'll want to run this process during non-work hours. It could run for hours and may use a lot of resources.

Another possibility: Turn on native query logging (Cognos Administration | System | All dispatchers | | Set properties | Settings | Logging | Check the boxes for "Audit the native query..."). Then have a person, a product like those from Motio, or a Cognos SDK program you create yourself run every report. Then you can get the SQL from the Audit database. Of course, the problem here is answering prompts. It will probably take a person to run these.

To add two columns to a list, or two data elements to a report or page header or footer, or two filters (I don't know what you mean by "clause"), you'll want to use the Cognos SDK .

  1. Choose relevant examples of different types of reports.
  2. Examine the XML report spec for each of those reports.
  3. Determine how to identify where the new element should appear in the XML.
  4. Write a program (probably in C# or Java) to use the SDK to...
    1. inspect every report in your environment.
    2. determine which pattern the report fits.
    3. add the data elements.
    4. save the report.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM