zoukankan      html  css  js  c++  java
  • 【转】ora-00031:session marked for kill(标记要终止的会话)解决方法

      今天碰到一个问题,有一张表不能操作,很可能是被锁了,首先想到的是kill session,于是执行了下列的脚本找到是哪个session有问题:

    select object_name, machine, s.sid,s.serial#

     from v$locked_object l, dba_objects o, v$session s

     where l.object_id = o.object_id

       and l.session_id =s.sid;

          发现有一个会话有锁sid 197,serial# 17,于是执行alter system kill session ‘197,17’;大概等了30s中,pl/sql developer报出一个错误:ora-00031:标记要终止的会话。

    解决方法:查出session的spid

    select spid, osuser, s.program

     from v$session s, v$process p

     where s.paddr = p.addr

       and s.sid =197;

    1. 在linux上,  kill -9 12345

    2. 在windows上,C:Documents and Settingsgg>orakill orcl 12345

    orcl:表示要杀死的进程属于的实例名

    12345:是要杀掉的线程号

    ORA-00031: session marked for kill

    Cause: The session specified in an ALTER SYSTEM KILL SESSION command cannot bekilled immediately (because it is rolling back or blocked on a networkoperation), but it has been marked for kill. This means it will be killed as soonas possible after its current uninterruptible operation is done.

    Action: No action is required for the session to be killed, but further executionsof the ALTER SYSTEM KILL SESSION command on this session may cause the sessionto be killed sooner.

  • 相关阅读:
    windows wsl2 卸载应用
    windows wsl2中ubuntu安装pip3
    href="#"与href="javascript:void(0)"的区别
    JavaScript 变量提升
    虚拟机升级之后.ubuntu找不到网络解决办法
    javascript 全局变量和局部变量
    flask celery使用
    flask magokit使用
    flask 缓存使用
    Linux设置/删除环境变量方法
  • 原文地址:https://www.cnblogs.com/fashflying/p/6263981.html
Copyright © 2011-2022 走看看