查询时间太长,想取消时,除了重启服务器以外,可以先查到对应的threadID,然后关掉对应的进程:
SELECT s.Sid AS "Sid",
s.Serial# AS "Serial#",
p.spid AS "ThreadID",
s.OSUser AS "OSUser",
s.Program AS "Program"
FROM V$Process p, V$session s
WHERE p.addr=s.paddr(+)
ORDER BY s.Sid ;
服务器上,运行cmd, orakill 服务名 进程id(上面查询得到)