Question

I would like to extract a list of all the Logical SQLs executed by OBIEE. This information is present in OBIEE's nqquery.log log files. I am looking for a script which can parse this log file and also provide the following information for each Logical SQL, in a CSV file

  • Hash Id of the Logical SQL and the complete query
  • Time Taken to execute the logical sql
  • Ability to group related Logical SQLs by Subject Area

It should be able to collect all the Physical SQLs for a given Logical SQL after I increase the log level and disable cache.

Added bonus, provide an Explain Plan for the Physical SQLs if I provide the Database connection information.

Does such a script exist or is it asking for too much?

Was it helpful?

Solution

ListOBIStats is a tool which does just that.

python listobistats.py --help

It collects the following information for each Logical SQL

  • Logical SQL Hash ID
  • Physical SQLs and their hash id
  • Elapsed Time
  • Number of rows fetched
  • ADFQuery XML tag if the datasource is OTBI (Oracle Transactional Business Intelligence)
  • A CSV file containing above data

Each Logical or Physical SQL is properly formatted and indented. They are written to separate files and are accessible from the HTML results in the browser.

If the datasource is an Oracle database, it is possible to automatically generate the Explain Plan.

Usage: python listobistats.py [options] $OBIEE_HOME/.../coreapplication_obis1/nqquery*.log
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top