0

I have a report on Cognos Analytics 11.1, with prompt pages. When I run the report

I want to see/find the query which is executed on oracle DB

with the prompt values that I am passing through.

Do you know If there is a log file , which keeps this info.

jarlh
  • 42,561
  • 8
  • 45
  • 63
eMazarakis
  • 122
  • 1
  • 13

2 Answers2

1

Maybe use the property Generated SQL to view the query

For Cognos 11

  • From query explorer. Select the query and change the property Use SQL Parameters to Literal

  • Next, Ctrl + Alt + M will reveal the menu options at the top for -- File, Edit, View

Select Tools

Then choose Show generated SQL/MDX

VAI Jason
  • 534
  • 4
  • 14
  • 1
    Through this option I can see the query which is going to be executed at the db, before the substitution of the Parameters. From over there I see in my query this expression : **AND a.open_date between to_date(#prompt('Parameter1','varchar')#,'rrrr-mm-dd')**. I wan to see the query after the substitution of the Parameter1. Do you know where can I find it? – eMazarakis Oct 16 '19 at 09:48
  • See updated instructions - select the query and change the property **Use SQL Parameters** to Literal – VAI Jason Oct 21 '19 at 13:31
0

There is a tool called Toad which is a client tool for developing and administering Oracle databases. When I worked with Cognos with Oracle as database, I could check the SQL sent to Oracle by Cognos using a feature in this client called "Session Browser" I think, where (if you have enough permissions) it was possible to view the last SQL queries executed by the users.

I guess there must be some kind of internal Oracle table where this information is stored. But that's something to ask in some Oracle DBA tag.