2 Replies Latest reply: Dec 11, 2012 7:08 AM by 917017 RSS

    Not able to see that particular query which is executed from application

    917017
      Hi Friends,

      I have one application which is executing a number of queries in the current session. I want to know which query is taking how much time?
      So I have executed following query in Toad for this purpose, but this is giving details of those queries only which are executed from either Toad or SQL developer.
      I am not able to see that particular query which is executed from application. Please suggest me if I am missing something.

      /*------------------
      select ss.schemaname,ss.machine,ss.program,ss.logon_time,ss.sql_exec_start,ss.wait_time,
      sa.first_load_time,sa.application_wait_time,sa.plsql_exec_time,sa.cpu_time,sa.elapsed_time,sa.sql_fulltext
      from v$session ss, v$sqlarea sa
      where sa.hash_value=ss.sql_hash_value
      order by sa.first_load_time desc;
      -------------------*/

      Oracle Version - Release 11.2.0.1.0 Production
      Toad Version - 9.5.0.31

      Regards,
      Sachin