connect reset vs disconnect vs terminate

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Laurence

    connect reset vs disconnect vs terminate

    Hi there,

    Does anyone know what's difference among "connect reset", "disconnect ",
    and "terminate" ?


    Thanks in advance,

  • Brian Tkatch

    #2
    Re: connect reset vs disconnect vs terminate

    Laurence wrote:
    Hi there,
    >
    Does anyone know what's difference among "connect reset", "disconnect ",
    and "terminate" ?
    >
    >
    Thanks in advance,
    IIRC, CONNECT RESET contains an implicit COMMIT and stops the
    connection to database. TERMINATE end the process the server held open
    to the client, and drops all resources. So, the best way to end a
    connection is first CONNECT RESET and then TERMINATE.

    I am not familiar with DISCONNECT, but i would assume it closes the
    connection with an implicit ROLLBACK.

    The command are explained in detail in the documentation. under
    COMMANDs.

    B.

    Comment

    • Gladiator

      #3
      Re: connect reset vs disconnect vs terminate


      Brian Tkatch wrote:
      Laurence wrote:
      Hi there,

      Does anyone know what's difference among "connect reset", "disconnect ",
      and "terminate" ?


      Thanks in advance,
      >
      IIRC, CONNECT RESET contains an implicit COMMIT and stops the
      connection to database. TERMINATE end the process the server held open
      to the client, and drops all resources. So, the best way to end a
      connection is first CONNECT RESET and then TERMINATE.
      >
      I am not familiar with DISCONNECT, but i would assume it closes the
      connection with an implicit ROLLBACK.
      >
      The command are explained in detail in the documentation. under
      COMMANDs.
      >
      B.


      I guess Disconnect we use it with embedded SQL in a program.
      DISCONNECT wont work in DB2CLP if we give directly,
      we have to use CONNECT RESET or TERMINATE for coming out of the
      connection...

      Regards
      Kamal....

      Comment

      • Knut Stolze

        #4
        Re: connect reset vs disconnect vs terminate

        Laurence wrote:
        Hi there,
        >
        Does anyone know what's difference among "connect reset", "disconnect ",
        and "terminate" ?
        There are quite a lot of subtly differences:

        CONNECT RESET and DISCONNECT are SQL statements, TERMINATE is a DB2 command.

        From the manuals:

        CONNECT RESET:
        ==============
        On type 1 connections, it disconnects and runs a COMMIT before.


        On type 2 connections, it connects to the default database. But there are a
        few more options to control what happens.


        DISCONNECT:
        ===========
        Can only be used from an application and not interactively. Also, there
        must not be an UOW running at the time of DISCONNECT.


        TERMINATE:
        ==========
        Explicitly terminates the command line processor's back-end process.

        Through that, it also disconnects from the DB2 server.

        --
        Knut Stolze
        DB2 z/OS Utilities Development
        IBM Germany

        Comment

        Working...