COGNOiSe.com - The IBM Cognos Community

ETL, App Development and other tools => Automation => Topic started by: tominboston on 13 Oct 2005 07:44:22 PM

Title: Data Dictionary and Compilation of Reports
Post by: tominboston on 13 Oct 2005 07:44:22 PM
 ???
Does anyone know how to extract the sql from several thousand Cognos Query reports published to Upfront?
I need to compile a list of reports and their sql.

Help!
Much thanks!

Title: Re: Data Dictionary and Compilation of Reports
Post by: dwood09 on 13 Oct 2005 08:14:31 PM
Does Cognos Query support Automation?!  If it does have an object model, then it should be possible to extract these details.  It is certainly possible to traverse the items of upfront.

cheers,
DW
Title: Re: Data Dictionary and Compilation of Reports
Post by: tominboston on 13 Oct 2005 08:19:24 PM
Man I am stuck on this one ... thanks for the input dwood,
but I don't know how I can get a user friendly view of the datastore/object store ... I can suck out a list of reports from the CQPackage.pkg but the sql is all crapped out .... (eg):
"... N_0aoBETWEEN_0aoNOT_20BETWEEN_0aoIS_0aoIS_20NOT_0an_0a0_0a0_0aClient_20Id_0aarial_2c_20geneva_2c_20helvetica_2c_20sans_2dserif_0a2_0a0_0a8_0accccff_0aarial_2c_20gen "

Any ideas?

(I'll have to buy you a beer if you can figure this out ...)
Title: Re: Data Dictionary and Compilation of Reports
Post by: dwood09 on 13 Oct 2005 08:23:25 PM
Check out the Doco for Cognos Query.  Does it mention anything about macros, object model, automation, batch processing etc?

cheers,
DW
Title: Re: Data Dictionary and Compilation of Reports
Post by: tominboston on 13 Oct 2005 08:24:36 PM
Nada my friend ... just nada ....  :-[
Title: Re: Data Dictionary and Compilation of Reports
Post by: dwood09 on 13 Oct 2005 08:38:55 PM
I've never used CQ, so am flying in the dark a bit, but can you check out / advise on the following:

* in upfront what details can you get from the CQ items, eg:
    * properties, descriptions, advanced details, file locations, references to definitions etc

* does the sql of CQ items exist in files somewhere on your server, or is it uploaded to a database
* where else can you see the SQL of these items?

cheers,
DW

Title: Re: Data Dictionary and Compilation of Reports
Post by: tominboston on 13 Oct 2005 09:01:58 PM
very little info about the reports in Upfront.

The sql appears to be saved in a files as a BLOB object - do you know how can I query these?
The info (sql and data) are in the following file formats:

1. querydb.oox (where x is a number) - these appear to be data files
2. rAAAAAzz.chg (where zz are 2 alpha chars) - these appear to be query files

both are not viewable in notepad ....
(crap)

Any ideas?
Title: Re: Data Dictionary and Compilation of Reports
Post by: Draoued on 17 Oct 2005 10:41:47 AM
Hi ,

Some ideas .

Do you know this link ?? It s showing you the most used queries and the average execution time.
Always good to know which queries are the most used one , isn't it ?

http://MyCognosServer/cognos/cgi-bin/cqcgi.exe/script/history.iws

Then there are 2 options to collect the SQL generated by Cognos Query.

A general one , activating the Trace in cognos Query. (http://support.cognos.com/kb-app/knowledgebase?document_search_show_document=1&document_id=86515&version_id=2)
Very disk consuming, and requires a stop/start of Cognos Query, then you need to parse the big file to see all the sql.

A one by one action. (http://support.cognos.com/kb-app/knowledgebase?document_search_show_document=1&document_id=1001970&version_id=1)
Opening one by one all the queries, and activating the Drill-through option, that will generate an IQD in the server.
Title: Re: Data Dictionary and Compilation of Reports
Post by: dwood09 on 17 Oct 2005 07:02:44 PM
sorry dude, I got nothing   ???
Title: Re: Data Dictionary and Compilation of Reports
Post by: Draoued on 18 Oct 2005 02:47:49 AM
Hi Dwood09 , Is it me dude ??

Which part you don't get ??
Title: Re: Data Dictionary and Compilation of Reports
Post by: tominboston on 18 Oct 2005 09:47:03 AM
 :o

Thanks Draoued,  ... crap ...it all seems painful ... little in way of automation.

... I have been able to parse through the _.pkg file (convert to xml 1st) created during a Deployment, and extract the Report Title, description, ... etc. including the Binary for the sql for each report.  I just need to translate this binary and I think we're there!

Cheers