query ASH information for completed concurrent request
Hello Experts,
How are you doing?
We have a customized concurrent program, which sometimes completed with longtime 20-30 minutes and sometimes completed under 1 minute, but we can't know which related request will take long time when it begins running, and we can't trace all users' request of this concurrent program in production instance. So I am wondering we can query ASH information for the request which we found it completed with 20-30 minutes.
Is there any way we can query all SQLs belonging to the request from ASH(V$ACTIVE_SESSIN/DBA_HIST_ACTIVE_SESSION) ? Then we can identify the plan for that SQLs and do troubleshooting and tuning.