Oracle锁表常用sql语句: select sess.sid, sess.serial#, lo.oracle_username, lo.os_user_name, ao.object_name, lo.locked_mode from v$locked_object lo, dba_objects ao, v$session sess where ao.object_id = lo.object_id and lo.session_ id = sess.sid; alter system
先查看哪些表被锁住了 select b.username,b.sid,b.serial#,logon_time from v$locked_object a,v$session b where a.session_id = b.sid and sid in( select a.SESSION_ID from v$locked_object a,dba_objects b where b.object_id = a.object_id and object_name ='HDM_COMPLETE
废话不多说 上语句:
查询锁表语句:
select object_name,machine,s.sid,s.serial#
from v$locked_object l,dba_objects o ,v$session s
where l.object_id = o.object_id and l.session_id=s.sid;
杀掉查到的进程:
alter system kill session 'sid,serial#';
例如:
alter system kill session