ORCLE 表被锁定 处理方案
1. 查出锁定表的sid, serial#,os_user_name, machine_name, terminal,锁的type,mode
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
2. 杀掉进程 sid,serial
// 格式 alter system kill session'sid,serial';
alter system kill session'5,40504';
网友评论