一、查询哪些表被锁以及查看锁表得会话及操作系统进程ID
其中locked_mode为锁的级别,spid为数据库所在操作系统的进程id
select c.sid, c.serial#, c.username, c.osuser, b.owner, b.object_name, a.locked_mode, p.spid from v$locked_object a, dba_objects b, v$session c, v$process p where a.object_id = b.object_id
and a.session_id = c.sid and c.paddr = p.addr ;
二、解锁
alter system kill session 'sid, serial#' ;--填写对应的sid, serial#