Oracle 表解锁

转载:Oracle 表解锁 http://toyota2006.iteye.com/blog/599255
其它资料:
关于ORACLE的锁表与解锁总结
http://linux.net527.cn/fuwuqiyingyong/Oracle/2010/1103/30162.html
1 获取锁住的表的信息
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 
WHERE l.sid = s.sid 
AND l.id1 = o.object_id(+) 
AND s.username is NOT Null

2 进行解锁
alter system kill session 'sid,serial#';


3 执行后报:无效的ALTER命令:
tt:用户名
alter tt kill session '109,1950';

你可能感兴趣的:(html,oracle,sql,linux,Blog)