How can i see Block Session in Oracle Database

Q : How can i see Block Session in Oracle Database

  SELECT H.SAMPLE_TIME  AS "TARIH",
         H.INSTANCE_NUMBER AS "SUNUCU",
         U.USERNAME AS "KULLANICI ",
         H.PROGRAM AS " UYGULAMA ",
         H.MODULE AS " MODÜL ",
         H.SQL_ID AS " BEKLEYEN SQL ID",
         H.TOP_LEVEL_SQL_ID AS " BEKLETEN SQL ID ",
         H.SQL_OPNAME AS " DML ",
         H.SESSION_ID "BEKLEYEN SESSION",
         H.BLOCKING_SESSION " ENGELLEYEN SESSION",
         H.BLOCKING_SESSION_SERIAL# " ENGELLEYEN SERIAL ",
         S.SQL_TEXT AS " BEKLEYEN SQL "
    FROM DBA_HIST_ACTIVE_SESS_HISTORY h, DBA_USERS u, DBA_HIST_SQLTEXT s
   WHERE     sample_time BETWEEN TO_DATE ('01/06/2020 12:28:00',
                                          'DD/MM/YYYY HH24:MI:SS')
                             AND TO_DATE ('01/06/2020 16:33:00',
                                          'DD/MM/YYYY HH24:MI:SS')
         AND H.USER_ID = U.USER_ID
         AND H.SQL_ID = S.SQL_ID
         AND H.BLOCKING_SESSION IS NOT NULL -- IPTAL EDILIRSE TUM SORGULARI ACAR
ORDER BY H.SAMPLE_TIME DESC

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir