We are interacting with DB though Pro*C. We want to find out the queries which are taking the longest time through Pro*C.
Is there a way to find out long running queries in Pro*C?
We are interacting with DB though Pro*C. We want to find out the queries which are taking the longest time through Pro*C.
Is there a way to find out long running queries in Pro*C?
The Pro*C programs should be readily identifiable in V$SESSION through the PROGRAM column. I'd go further and explicitly set MODULE through DBMS_APPLICATION_INFO, which will allow you to track down individual SQLs in V$SQL.
Once you instrument your code, it becomes much easier to use the diagnostic facilities such as trace or any extras you may have paid for with the Diagnostics or Tuning packs