The ways to kill Oracle session

 

As we all known ,its the normal way  to use the SQL  'alter system kill 'sid,serial#'' to kill a session,but in some situation ,we hava to kill all the session by the SERVICES,such as deadlock with TM contention.

So,does the Oracle the good idea to deal with this case?

Off course,Oracle provide the procedurce DBMS_SERVICE.DISCONNECT_SESSION .

 

you can use the following SQL to kill the SERVERs' sessions;

BEGIN
  DBMS_SERVICE.DISCONNECT_SESSION(
    service_name      => 'sales.example.com',
    disconnect_option => DBMS_SERVICE.NOREPLAY);
END;
/

 

posted @ 2017-08-11 18:33  烤酸奶  阅读(183)  评论(0编辑  收藏  举报