select oracle_username ' (' s.osuser ')' username , s.sid ',' s.serial# "SID,SESSION#" , owner '.' object_name object , object_type , decode( l.

block , 0, 'Not Blocking' , 1, 'Blocking' , 2, 'Global') status , decode(v.locked_mode , 0, 'None' , 1, 'Null' , 2, 'Row-S (SS)' , 3, 'Row-X (SX)' , 4, 'Share' , 5, 'S/Row-X (SSX)' , 6, 'Exclusive', TO_CHAR(lmode)) mode_held from v$locked_object v , dba_objects d , v$lock l , v$session s where v.object_id = d.object_id and v.object_id = l.id1 and v.session_id = s.sid order by oracle_username,session_id; SELECT --'ALTER SYSTEM KILL SESSION ' '''' s.sid ',' s.serial# '''' ' I MMEDIATE;', s.schemaname "Schema Name", s.status "Status",--p.spid "Proces s", a.SQL_ID, s.osuser "OS User",s.module "Module",s.action "Action", --s.program "Program",a.last_active_time "Last Active Time", s.blocking_session_status "Blocking Status", --(p.pga_used_mem/1000000) "PGA Used Memory",p.pga_max_mem/1000000) "PGA max Memory", s.event,a.sql_text,a.sql_fulltext "SQL Text" FROM v$session s,v$sqlarea a,v$process p WHERE s.sql_hash_value = a.hash_value AND s.sql_address = a.address AND s.paddr = p.addr --AND s.osuser IN ('NF9233','nf9233') AND s.status = 'ACTIVE' --and s.sid='914' AND s.event NOT LIKE '%lock%timer%' --AND s.action IS NOT NULL ORDER BY s.event DESC NULLS LAST; SELECT * FROM v$sql_bind_capture WHERE sql_id = '284d391crjgc9'; select blocking_session, sid, serial#, wait_class, seconds_in_wait from v$session where blocking_session is not NULL order by blocking_session;

Sign up to vote on this title
UsefulNot useful