oracle 表被锁定 杀死进程

/*查出被锁biao*/
select b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where b.object_id = a.object_id;
/*查出锁定表的sid, serial#,*/
SELECT s.sid, s.serial#, s.username, s.schemaname, s.osuser, s.process, s.machine,
s.terminal, s.logon_time, l.type
FROM v$session s, v$lock l
WHERE s.sid = l.sid
AND s.username IS NOT NULL
ORDER BY sid;
/*杀掉进程 sid,serial#*/
alter system kill session'sid,serial';
上一篇:分布式监控系统Zabbix-3.0.3-完整安装记录(7)-使用percona监控MySQL


下一篇:ASP.NET 5 之 错误诊断和它的中间件们