Thursday, May 19, 2011

To identify blockers

col "SID" format a10
col "Lock Type" format a15
col "Mode Held" format a15
col "Blocking?" format a15
SELECT SUBSTR(TO_CHAR(session_id),1,5) "SID",
SUBSTR(lock_type,1,15) "Lock Type",
SUBSTR(mode_held,1,15) "Mode Held",
SUBSTR(blocking_others,1,15) "Blocking?"
FROM dba_locks
where blocking_others='Blocking';

no rows selected

SQL>

SQL> select sid, serial#, username, status, program, module, sql_id from v$session
2 where sid=293;


select sql_text from v$sqlarea where sql_id='4m9tcwtvdfqj5';

No comments:

Post a Comment