彻底killed掉某用户进程

来源:互联网 发布:python 去除重复元素 编辑:程序博客网 时间:2024/05/22 07:58

 

alter  system  kill   session 'sid,serial#';

select sid,serial#,username,status from v$session order by status;

 

但此时通过查询v$session,发现会话24依然存在,并属于僵死状态(KILLED):

SQL>  select sid,serial#,username,status from v$session;

       SID    SERIAL# USERNAME                       STATUS

---------- ---------- ------------------------------ --------

         1          1                                ACTIVE

         2          1                                ACTIVE

         3          1                                ACTIVE

         4          1                                ACTIVE

         5          1                                ACTIVE

         7          1                                ACTIVE

         9          1                                ACTIVE

        10          1                                ACTIVE

        11          1                                ACTIVE

        12          1                                ACTIVE

        13          1                                ACTIVE

        14          1                                ACTIVE

        15          1                                ACTIVE

        18          1                                ACTIVE

        20         30 RTP_USER_99            INACTIVE

        21         20 RTP_USER_99            INACTIVE

        22      10984 RTP_USER_99          INACTIVE

        23      44840 SYS                        INACTIVE

        24      36906 SYS                        KILLED

        25        330 SYS                          ACTIVE

20 rows selected.

对于僵死会话,需要杀掉对应的OS进程才能完全清除.

 

 

SQL>  select spid,pid from v$process where addr=(select paddr from v$session where sid=(select sid from v$mystat where rownum=1));

 

SPID                PID

------------ ----------

1790                 33

 

 

Kill  -9  spid

 

 

 

 

原创粉丝点击