查询所有会话 select t2.username, t2.sid, t2.serial#, t2.logon_time from v$locked_object t1, v$session t2 where t1.session_id = t2.sid order by t2.logon_time; 强行结束会话 alter system kill session 'sid,serial';…
打开sql plus select session_id from v$locked_object;查询出oracle锁定的会话ID SELECT sid, serial#, username, osuser FROM v$session where sid = 1; 查询出当前会话数的信息 ALTER SYSTEM KILL SESSION '200,2141'; 杀掉当前会话 注:'200,2141'是:SID和SERIAL字段进行拼接的 …
SELECT sid, serial#, username, osuser FROM v$session where sid in(select session_id from v$locked_object); --kill掉相关的会话 ALTER SYSTEM KILL SESSION '597,1171';…
1.查询被锁的会话ID: select session_id from v$locked_object;查询结果:SESSION_ID-------92.查询上面会话的详细信息: SELECT sid, serial#, username, osuser FROM v$session where sid = 9; 3.将上面锁定的会话关闭: ALTER SYSTEM KILL SESSION '9,99';…