现在位置:
首页 > SQL Server > 正文
查看哪些表被锁和怎么解锁
--检查那个表被锁
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 kill session ''273,45'';
/*SELECT b.Object_Name, c.Sid, c.Serial#
FROM V$locked_Object a, Dba_Objects b, V$session c
WHERE a.Object_Id = b.Object_Id
AND a.Session_Id = c.Sid
AND b.Object_Name = ''T_ZYYS_BCJL'';
alter system kill session ''128,10662'';*/
UPDATE tableA set tableA.CODE = b.CODE
from tableB as b inner join tableA on tableA.tableBID=b.[ID]
e