查询锁表语句:
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;
杀掉进程:
ALTER SYSTEM KILL SESSION'110,25773';
报错:ORA-00031
查询SPID:select spid, osuser, s.program from v$session s, v$process p where s.paddr = p.addr and s.sid =110;
1. 在linux上, kill -9 12345
2. 在windows上,命令窗口执行:orakill orcl 12345
orcl:表示要杀死的进程属于的实例名
12345:是要杀掉的线程号