欢迎~

Hope is a good thing...Maybe the best of things. And no good thing ever dies..     
隐藏

Oracle- Kill session

When you meet below scenarios, you may check the locked table and kill the session.

  • Unable to compile the source because of blocking tables.
  • The session is dead and unable to close it (including both test script and form)

1. Check the locked table.

     SELECT C.OBJECT_NAME, C.OWNER, B.OSUSER, B.SID, B.SERIAL#, D.SPID FROM V$LOCKED_OBJECT A, V$SESSION B, ALL_OBJECTS C,             V$PROCESS D WHERE A.OBJECT_ID = C.OBJECT_ID AND A.SESSION_ID = B.SID AND B.PADDR = D.ADDR;

2. kill session : alter system kill session 'SID.SERIAL#' IMMEDIATE;

    alter system kill session 'XXX' immediate.

posted @ 2021-07-15 13:59  Tuzi_ya  阅读(96)  评论(0)    收藏  举报