DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: alter system disconnect session

  1. #1
    Join Date
    Dec 2002
    Posts
    18

    alter system disconnect session

    Hello gurus!

    Here's a simple question that I can't seem to find the answer from any oracle documents (or maybe I'm not trying hard enough)...

    What is the difference of the following commands:

    ALTER SYSTEM DISCONNECT SESSION '9,3' IMMEDIATE
    and
    ALTER SYSTEM KILL SESSION '9,3' IMMEDIATE

    Thanks in advance

    Best Regards,
    toshi

  2. #2
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187
    the differences appear to be clearly documented

    http://download-west.oracle.com/docs...23.htm#2053604

    what are you confused about?
    I'm stmontgo and I approve of this message

  3. #3
    Join Date
    Dec 2002
    Posts
    18
    Sorry, my previous post seems not to be so clear.
    Here is what I am confused about:

    When you issue the command: ALTER SYSTEM KILL SESSION '13, 8';
    The statement kills the session with SID 13 and SERIAL# 8

    When you issue the command: ALTER SYSTEM DISCONNECT SESSION '13, 8' POST_TRANSACTION;
    The statement disconnects the session with SID 13 and SERIAL# 8

    Not much of a difference, isn't it?

    I know that the later waits for the transaction to finish before disconnecting the user but the document (http://download-west.oracle.com/doc..._23.htm#2053604) didn't tell us that, did it?

    Now what I'm confused about is the 'IMMEDIATE' clause when used with 'DISCONNECT SESSION' and 'KILL SESSION'. Or maybe there is no difference but I just want to know.

    Thanks for your reply

  4. #4
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Originally posted by toshi

    Now what I'm confused about is the 'IMMEDIATE' clause when used with 'DISCONNECT SESSION' and 'KILL SESSION'. Or maybe there is no difference but I just want to know.

    Thanks for your reply
    There is difference. With "kill" you mark the session as dead, rollback ongoing transactions, release all session locks, and partially recover session resources. With "disconnect" you only destroy the dedicated process (or the circuit).
    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g,12c
    email: ocp_9i@yahoo.com

  5. #5
    Join Date
    Feb 2001
    Location
    UAE
    Posts
    304
    IMMEDIATE clause with KILL SESSION:
    instruct Oracle to roll back ongoing transactions, release all session locks, recover the entire session state, and return control to you immediately.

    IMMEDIATE clause with DISCONNECT SESSION:
    disconnects the session and recovers the entire session state immediately, without waiting for ongoing transactions to complete.
    Agasimani
    OCP(10g/9i/8i/8)

  6. #6
    Join Date
    Dec 2002
    Posts
    18
    Thanks for your replies!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width