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.

  • 相关阅读:
    UVALive 7509 Dome and Steles
    HDU 5884 Sort
    Gym 101194H Great Cells
    HDU 5451 Best Solver
    HDU 5883 The Best Path
    HDU 5875 Function
    卡特兰数
    UVa 11729 Commando War 突击战
    UVa 11292 The Dragon of Loowater 勇者斗恶龙
    Spark Scala Flink版本对应关系
  • 原文地址:https://www.cnblogs.com/fashflying/p/6263981.html
Copyright © 2011-2022 走看看