数据库等待相关查询SQL
-----------------------------------------------查看数据库会话情况
查看会话情况 select to_char(trunc(a.SAMPLE_TIME,'mi'),'yyyy-mm-dd hh24:mi:ss'),a.INSTANCE_NUMBER,count(1) cnt from dba_hist_active_sess_history a where a.SAMPLE_TIME>=to_timestamp('202308211400','yyyymmddhh24mi') and a.SAMPLE_TIME=to_timestamp('202308211400','yyyymmddhh24mi') and a.SAMPLE_TIME=to_timestamp('202308211400','yyyymmddhh24mi') and a.SAMPLE_TIME=to_timestamp('202308211400','yyyymmddhh24mi') and a.SAMPLE_TIME 5 ORDER BY 1;