SQL> SELECT s.username,s.status,
2 x.ADDR,x.KSLLAPSC,x.KSLLAPSN,x.KSLLASPO,x.KSLLID1R,x.KSLLRTYP,
3 decode(bitand (x.ksuprflg,2),0, null ,1)
4 FROM x$ksupr x,v$session s
5 WHERE s.paddr(+)=x.addr
6 and bitand(ksspaflg,1)!=0;
USERNAME STATUS ADDR KSLLAPSC KSLLAPSN KSLLASPO KSLLID1R KSLL DE
---------- ---------------- -------- ---------- ---------- ------------------------ ---------- ---- --
ACTIVE 35FD5990 6 26 14121 0 1
ACTIVE 35FD6FD8 1 69 14055 0 1
ACTIVE 35FD8620 1 69 14055 0 1
ACTIVE 35FD9C68 1 69 14055 0 1
ACTIVE 35FDB2B0 8 27 15300 0 1
ACTIVE 35FDC8F8 12 36 15300 0 1
ACTIVE 35FDDF40 1 69 14055 0 1
ACTIVE 35FDF588 1 69 14055 0 1
ACTIVE 35FE3860 7 26 14236 0 1
ACTIVE 35FE4EA8 1 69 14224 0 1
ACTIVE 35FE64F0 63 2 14311 377 EV 1
ACTIVE 35FEA7C8 3 26 14155 258 EV 1
ACTIVE 35FE9180 59 2 14248 378 EV 1
ACTIVE 35FE9CA4 12 2 14603 0 1
ACTIVE 35FD64B4 1 69 14055 0 1
ACTIVE 35FD7AFC 2 27 14055 0 1
ACTIVE 35FD9144 2 27 15300 0 1
ACTIVE 35FDA78C 3 26 14171 0 1
ACTIVE 35FDBDD4 17 2 15255 0 1
ACTIVE 35FDD41C 22 26 14155 0 1
ACTIVE 35FDEA64 52 26 14155 0 1
ACTIVE 35FE4384 1 69 14224 0 1
ACTIVE 35FE59CC 1 69 14224 0 1
ACTIVE 35FEB2EC 2 2 14248 0 1
ACTIVE 35FEC934 11 26 14121 0 1
SYS ACTIVE 35FEF5C4 4 16 14117 0
35FE0BD0 1 69 14055 0
35FE865C 1 69 14117 0
35FE7B38 1 69 14117 0
35FE16F4 1 26 14155 0
35FD4E6C 0 0 0
35FE00AC 2 279 14117 0
35FE2D3C 0 0 0
35FE7014 2 335 14117 0
--挑选username和status为null的会话
SQL> select spid,program from v$process where addr in (
2 ‘35FE0BD0‘ ,
3 ‘35FE865C‘ ,
4 ‘35FE7B38‘ ,
5 ‘35FE16F4‘ ,
6 ‘35FD4E6C‘ ,
7 ‘35FE00AC‘ ,
8 ‘35FE2D3C‘ ,
9 ‘35FE7014‘
10 );
SPID PROGRAM
------------------------------------------------ ------------------------------
PSEUDO
14179 [email protected] (D000)
14183 [email protected] (S000)
15300 [email protected] (TNS V1-V3)
15318 [email protected] (TNS V1-V3)
14252 [email protected] (N000)
14256 [email protected] (L000)
14260 [email protected] (L001)
8 rows selected.
--同样可以发现spid 15300和15318的进程已经在数据库中被kill掉
|