Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Disconnect session before killing it

MaxSep 14 2016 — edited Sep 15 2016

DB versions: 10.2, 11.2.0.4

OS : RHEL 6.x

Is it a good practice to issue DISCONNECT SESSION before killing a session ?

ALTER SYSTEM DISCONNECT SESSION 'sid, serial#' IMMEDIATE';

ALTER SYSTEM KILL SESSION 'sid, serial#' IMMEDIATE' ;

As per the below doc, DISCONNECT SESSION clause will destroy the dedicated server process .

https://docs.oracle.com/cloud/latest/db112/SQLRF/statements_2014.htm#SQLRF00902

But, my colleague says DISCONNECT SESSION is only useful for DB versions 10g or below.

But, If I remember correctly, even in 11.2, after using DISCONNECT SESSION + KILL SESSION , I still had sessions which returned 'marked for kill' message and stayed with v$session.status='KILLED' for several minutes.

I just want to know the best practice.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2016
Added on Sep 14 2016
17 comments
1,289 views