Search code examples
oracleoraclereports

How to extract sql query from Oracle reports


I have Oracle report file (rdf file). I need to find what are the queries running (SQL queries) to extract data for this report.

As an example, how to find what is the query running once we click on save button related to this RDF file?


Solution

  • Obviously, the simplest way is to open that report in Reports Builder (which supports RDF version you have; I mean, Reports 2.5 probably won't open a RDF created in version 10g) and have a look at the data model editor.

    Otherwise, do as I do it - open a RDF (or, if you have a JSP - even better) with a text editor (such as Notepad) and perform search through the file - search for SELECT keyword. You'll find some useless entries, but you'll certainly see useful ones as well. Copy them out of the RDF file and ... well, do whatever you planned to do with them.