2020/1/4 21:02:21

Category 软件技术 Tag oracle,锁表


select p.spid,






  from v$process p, v$session a, v$locked_object b, all_objects c

 where p.addr = a.paddr

   and a.process = b.process

   and c.object_id = b.object_id;



select l.session_id sid, 










from v$sqlarea a, v$session s, v$locked_object l 

where l.session_id = s.sid 

   and s.prev_sql_addr = a.address 

order by sid, s.serial#;


select * from v$session t1, v$locked_object t2 where t1.sid = t2.SESSION_ID; 


alter system kill session '2888,44';  --即spid,serial