Sql History of specific Schemas !
Oracle DB Version - 19.15.0.0.0
OS Version - Oracle Linux Server release 7.9
We have a requirement to fetch data of all sql statements fired by certain schemas in the past 1 month with avg elapsed time.
I used 2 below views but could see differences because of the limitations in TOPNSQL of AWR.
1) dba_hist_sqlstat
2) dba_hist_active_sess_history
How to combine both the views and eliminate duplications for getting the desired results. At the same time sql_exec_id or sql_exec_start column is not available in dba_hist_sqlstat. i can fetch forming 2 different set of sqls but how to merge it as one and get the results.