Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Physical SQL Query

Received Response
32
Views
7
Comments
TomasJuarez-Oracle
TomasJuarez-Oracle Rank 1 - Community Starter

Hi everyone!

Is it possible to get the physical sql query generated programmatically?

I mean, I want a script or something like that, to get the sql right after report runs.

Any idea?

Answers

  • Martin van Donselaar
    Martin van Donselaar Rank 6 - Analytics Lead

    You can get that (if you have the proper privileges) via Administration --> Manage Sessions.

    Select the action that you want to see the physical SQL of. You can see in the information column which item has generated the sql.

    Down below in the log will be the physical SQL statement(s).

    An other way to get the same is to copy the logical SQL from the advanced tab when you are editing an analysis. You can issue this sql via Administration  --> Issue SQL which will also generate a log entry containing the Physical SQL.

    EDIT: Also, your logging level needs to be set to 2

  • Joel
    Joel Rank 8 - Analytics Strategist

    In addition to what @Martin van Donselaar has suggested, you can get this information from your Usage Tracking tables if you have enabled Usage Tracking.

  • TomasJuarez-Oracle
    TomasJuarez-Oracle Rank 1 - Community Starter

    Thanks Martin, but I don't want to do it manually. I need a way to automate this action...

  • TomasJuarez-Oracle
    TomasJuarez-Oracle Rank 1 - Community Starter

    Hi Joel,

    I like your suggestion, I will investigate.

    Thank you!

  • Hi,

    For more hints on how to achieve what you are asking it would help if you set a context ...

    As it's a client-server architecture the concept of "right after report runs" is a bit vague, as you can have none, one or 1258 concurrent users.

  • Martin van Donselaar
    Martin van Donselaar Rank 6 - Analytics Lead

    Well, that's one of the things that usage tracking does as Joel already said. Really wondering what exactly you want to achieve?

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    @TomasJuarez-Oracle since you do not state what you are trying to achieve in spite of multiple questions...

    https://www.rittmanmead.com/blog/2014/01/automated-regression-testing-for-obiee/

    ^-- the command line can automate just about anything