469,601 Members | 2,039 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,601 developers. It's quick & easy.

connect reset vs disconnect vs terminate

Hi there,

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

Dec 14 '06 #1
3 42850
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.

Dec 14 '06 #2

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....

Dec 14 '06 #3
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.
http://publib.boulder.ibm.com/infoce...n/r0000906.htm

On type 2 connections, it connects to the default database. But there are a
few more options to control what happens.
http://publib.boulder.ibm.com/infoce...n/r0000908.htm

DISCONNECT:
===========
Can only be used from an application and not interactively. Also, there
must not be an UOW running at the time of DISCONNECT.
http://publib.boulder.ibm.com/infoce...n/r0000943.htm

TERMINATE:
==========
Explicitly terminates the command line processor's back-end process.
http://publib.boulder.ibm.com/infoce...e/r0001973.htm
Through that, it also disconnects from the DB2 server.

--
Knut Stolze
DB2 z/OS Utilities Development
IBM Germany
Dec 14 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by http://www.visual-basic-data-mining.net/forum | last post: by
reply views Thread by Jim Hubbard | last post: by
7 posts views Thread by fyi85 | last post: by
2 posts views Thread by Draw | last post: by
2 posts views Thread by Geoff | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.