https://blog.csdn.net/qq_27317147/article/details/52048770
select sess.sid,
sess.serial#,
lo.oracle_username,
lo.os_user_name,
ao.object_name,
lo.locked_mode
from v$locked_object lo,
dba_objects ao,
v$session sess
where ao.object_id = lo.object_id and lo.session_id = sess.sid;
--1
1726
2404
ZGGL
Administrator
KPMG_SUBJ_LIST_HIGHEST
3
select spid, osuser, s.program
from v$session s,v$process p
where s.paddr=p.addr and s.sid=1726;
alter system kill session '1726,2404' immediate;
--1
5160
1726
2404
ZGGL
select a.spid,b.sid,b.serial#,b.username from v$process a,v$session b where a.addr=b.paddr and b.status='KILLED';
select b.spid,a.osuser,b.program from v$session a,v$process b where a.paddr=b.addr and a.sid=1726;
select spid, osuser, s.program
from v$session s,v$process p
where s.paddr=p.addr and s.sid=1718;
select sess.sid,
sess.serial#,
lo.oracle_username,
lo.os_user_name,
ao.object_name,
lo.locked_mode
from v$locked_object lo, dba_objects ao, v$session sess
where ao.object_id = lo.object_id and lo.session_id = sess.sid;
select spid, osuser, s.program
from v$session s,v$process p
where s.paddr=p.addr and s.sid=1718;
alter system kill session '1718,2404' immediate;
select spid, osuser, s.program
from v$session s,v$process p
where s.paddr=p.addr and s.sid=1726;
--1
1718
217
BSDUSR
stevenxu
KPMG_JOURNAL
3
select sess.sid,
sess.serial#,
lo.oracle_username,
lo.os_user_name,
ao.object_name,
lo.locked_mode
from v$locked_object lo,
dba_objects ao,
v$session sess
where ao.object_id = lo.object_id and lo.session_id = sess.sid;
select name from v$database;
alter system kill session '1718,217' immediate;
--1
1360
1718
217
BSDUSR
select a.spid,b.sid,b.serial#,b.username from v$process a,v$session b where a.addr=b.paddr and b.status='KILLED';
--1
1360
stevenxu
ORACLE.EXE (SHAD)
select b.spid,a.osuser,b.program from v$session a,v$process b where a.paddr=b.addr and a.sid=1718;
--1
1360
stevenxu
SQL Developer
select spid, osuser, s.program
from v$session s,v$process p
where s.paddr=p.addr and s.sid=1718;
orakill DATALAKE 1360
C:\Users\Administrator>orakill datalake 1306
Kill of thread id 1306 in instance datalake successfully signalled.