记录oracle中被锁表的解锁语句
先查询锁的情况:
select object_name as 名称, s.sid, s.serial#, p.spid as 进程号,s.machine
from v$locked_object l , dba_objects o , v$session s , v$process p
where l.object_id=o.object_id and l.session_id=s.sid and s.paddr=p.addr and object_name='表名称'
然后删除锁进程:
--alter system kill session 'sid,serial#’
alter system kill session '123,12345'