Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Query to find the blocking session in time interval.

$
0
0
Please use the below query to get the output.

set lines 170
set pages 10000
col event format a40
col sample_time format a40
select to_char(sample_time,'DD-MON-YY HH24:MI:SS'),SESSION_ID,SESSION_SERIAL#,SQL_ID,BLOCKING_SESSION,BLOCKING_SESSION_SERIAL#,BLOCKING_SESSION_STATUS,EVENT from dba_hist_active_sess_history where to_char(sample_time,'DD-MON-YY HH12:MI:SS') between '22-DEC-17 00:05 AM' and '22-DEC-17 09:10 AM' and event like '%enq:%' and BLOCKING_SESSION is not null order by 1 ;


Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>