--首先查看有哪些锁 select /*+ rule */ s.username, decode(l.type,'TM','TABLE LOCK','TX','ROW LOCK',null) lock_level, o.owner, o.object_name, o.object_type, s.sid,s.serial#, s.terminal, s.machine, s.program, s.osuser from v$session s,v$lock l,dba_objects o whe…