Blocking session detail

Try below 2 querys for blocking session detail:


For which SQL is currently waiting on:

==================================


select

   sid,

   sql_text 

from

   v$session s,

   v$sql q 

where

   sid in

   (select

      sid

   from

      v$session

  where

      state in ('WAITING')

  and

      wait_class != 'Idle'

  and 

      event='enq: TX - row lock contention'

  and 

     (q.sql_id = s.sql_id or q.sql_id = s.prev_sql_id));


The blocking session is:

================================


select

   blocking_session,

   sid,    serial#,

   wait_class,

   seconds_in_wait 

from

   v$session 

where

   blocking_session is not NULL

order by

   blocking_session;

Comments

Popular posts from this blog

Shareplex some commands

SQL Tuning Task Creation ORA-13780: SQL statement does not exist.

ORA 700 [kskvmstatact: excessive swapping observed]