

/*
MOS Id [ID 786507.1] - How to Determine the Blocking Session for Event: 'cursor: pin S wait on X' 


*/

SELECT s.inst_id
     , s.sid
     , to_number(substr(to_char(rawtohex(p2raw)),1,8),'XXXXXXXX') Blocking_SID 
     , s.username
     , s.event
  FROM gv$session s
 WHERE event = 'cursor: pin S wait on X'; 
