oracle锁表解决方法

SQL> select session_id from v$locked_object;

SESSION_ID
----------
142

SQL> SELECT sid, serial#, username, osuser FROM v$session where sid = 142;

SID SERIAL# USERNAME OSUSER
---------- ---------- ------------------------------ ------------------------------
142 38 SCOTT LILWEN

SQL> ALTER SYSTEM KILL SESSION '142,38';

System altered

--》》》》》》》》》》》》》》查询具体的语句sql和表
select inst_id,session_id,object_id,locked_mode from v$locked_object;
select vs.inst_id,vs.sid,vs.SERIAL#,vs.MACHINE,vs.MODULE,vs.SQL_ID,vq.SQL_TEXT from gv$session vs ,gv$sql vq
where vs.inst_id=&inst_id and vs.sid=&session_id and vs.sql_id=vq.SQL_ID;

上一篇:体验 ASP.NET Core 1.1 中预编译 MVC Razor 视图


下一篇:学号 20175201张驰 《Java程序设计》第8周学习总结