Grid SQL Monitoring
In order to store and later analyze the SQLs in SQL Monitor in Enterprise Manager Grid window; you could note using below SQL:
First, create a temporary table in order not to lose the data in gv$ view.
create table my_sql_monitor as select * from gv$sql_monitor;
And later analyze, for instance, find long running session SQLs, whether they ran parallel or not, so on by below SQL.
select distinct sql_id,min(px_servers_requested),min(px_servers_allocated),
min(sql_exec_start),max(elapsed_time),max(concurrency_wait_time),sql_text from my_sql_monitor where sql_text is not null
group by sql_id,sql_text
order by max(elapsed_time) desc,1 desc;
Categories: tips
Grid SQL Monitoring, SQL list
