263 lines
17 KiB
HTML
263 lines
17 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="reference" />
|
||
|
<meta name="DC.Title" content="Determine connection type" />
|
||
|
<meta name="abstract" content="When a remote connection is established it will use either an unprotected or protected network connection." />
|
||
|
<meta name="description" content="When a remote connection is established it will use either an unprotected or protected network connection." />
|
||
|
<meta name="DC.subject" content="distributed relational database, connection type, protected, unprotected, determining, committable updates, connection, determining type, SQLCA (SQL Communication Area), SQLERRD field, SQLERRD(4), determining connection type, data, committable updates, commitment control, DRDA resource, remote unit of work, connection type, distributed unit of work, read-only connection" />
|
||
|
<meta name="keywords" content="distributed relational database, connection type, protected, unprotected, determining, committable updates, connection, determining type, SQLCA (SQL Communication Area), SQLERRD field, SQLERRD(4), determining connection type, data, committable updates, commitment control, DRDA resource, remote unit of work, connection type, distributed unit of work, read-only connection" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafydistribsupport.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rbafyaccrdi.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../rzakj/rzakjcommitkickoff.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rbafydetconn" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Determine connection type</title>
|
||
|
</head>
|
||
|
<body id="rbafydetconn"><a name="rbafydetconn"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Determine connection type</h1>
|
||
|
<div><p>When a remote connection is established it will use either an unprotected
|
||
|
or protected network connection. </p>
|
||
|
<div class="section"><p>With regards to committable updates, this SQL connection may be
|
||
|
read-only, updatable, or unknown whether it is updatable when the connection
|
||
|
is established. A committable update is any insert, delete, update, or DDL
|
||
|
statement that is run under commitment control. If the connection is read-only,
|
||
|
changes using COMMIT(*NONE) can still be run. After a CONNECT or SET CONNECTION,
|
||
|
SQLERRD(4) of the SQLCA and DB2_CONNECTION_TYPE of the SQL diagnostic area
|
||
|
indicate the type of connection. </p>
|
||
|
</div>
|
||
|
<div class="section"><p>DB2_CONNECTION_TYPE specific values are:</p>
|
||
|
</div>
|
||
|
<div class="section"> <ol><li>The connection is to the local relational database and the connection
|
||
|
is protected. </li>
|
||
|
<li>The connection is to a remote relational database and the connection is
|
||
|
unprotected.</li>
|
||
|
<li>The connection is to a remote relational database and the connection is
|
||
|
protected.</li>
|
||
|
<li>The connection is to an application requester driver program and the connection
|
||
|
is protected.</li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
<div class="section"><p>SQLERRD(4) specific values are: </p>
|
||
|
</div>
|
||
|
<div class="section"> <ol><li>The connection is to a remote relational database and the connection is
|
||
|
unprotected. Committable updates can be performed on the connection. This
|
||
|
will occur when any of the following are true: <ul><li>The connection is established using remote unit of work (RUW). </li>
|
||
|
<li>If the connection is established using distributed unit of work (DUW)
|
||
|
then all the following are true: <ul><li>The connection is not local. </li>
|
||
|
<li>The application server does not support distributed unit of work. For
|
||
|
example, a DB2<sup>®</sup> UDB
|
||
|
for iSeries™ application
|
||
|
server with OS/400 V3R1 or earlier.</li>
|
||
|
<li>The commitment control level of the program issuing the connect is not
|
||
|
*NONE. </li>
|
||
|
<li>Either no connections to other application servers (including local) exist
|
||
|
that can perform committable updates or all connections are read-only connections
|
||
|
to application servers that do not support distributed unit of work. </li>
|
||
|
<li>There are no open updatable local files under commitment control for the
|
||
|
commitment definition. </li>
|
||
|
<li>There are no open updatable DDM files that use a different connection
|
||
|
under commitment control for the commitment definition. </li>
|
||
|
<li>There are no API commitment control resources for the commitment definition. </li>
|
||
|
<li>There are no protected connections registered for the commitment definition. </li>
|
||
|
</ul>
|
||
|
If running with commitment control, SQL will register a one-phase updatable DRDA<sup>®</sup> resource
|
||
|
for remote connections or a two-phase updatable DRDA resource for local and ARD connections. </li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
<li>The connection is to a remote relational database and the connection is
|
||
|
unprotected. The connection is read-only. This will occur only when the following
|
||
|
are true: <ul><li>The connection is not local. </li>
|
||
|
<li>The application server does not support distributed unit of work </li>
|
||
|
<li>At least one of the following is true: <ul><li>The commitment control level of the program issuing the connect is *NONE. </li>
|
||
|
<li>Another connection exists to an application server that does not support
|
||
|
distributed unit-of-work and that application server can perform committable
|
||
|
updates </li>
|
||
|
<li>Another connection exists to an application server that supports distributed
|
||
|
unit-of-work (including local). </li>
|
||
|
<li>There are open updatable local files under commitment control for the
|
||
|
commitment definition. </li>
|
||
|
<li>There are open updatable DDM files that use a different connection under
|
||
|
commitment control for the commitment definition. </li>
|
||
|
<li>There are no one-phase API commitment control resources for the commitment
|
||
|
definition. </li>
|
||
|
<li>There are protected connections registered for the commitment definition. </li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
If running with commitment control, SQL will register a one-phase DRDA read-only
|
||
|
resource. </li>
|
||
|
<li>The connection is to a remote relational database and the connection is
|
||
|
protected. It is unknown if committable updates can be performed. This will
|
||
|
occur when all of the following are true: <ul><li>The connection is not local. </li>
|
||
|
<li>The commitment control level of the program issuing the connect is not
|
||
|
*NONE. </li>
|
||
|
<li>The application server supports both distributed unit of work and two-phase
|
||
|
commit protocol (protected connections). </li>
|
||
|
</ul>
|
||
|
If running with commitment control, SQL will register a two-phase DRDA undetermined
|
||
|
resource. </li>
|
||
|
<li>The connection is to a remote relational database and the connection is
|
||
|
unprotected. It is unknown if committable updates can be performed. This will
|
||
|
occur only when all of the following are true: <ul><li>The connection is not local. </li>
|
||
|
<li>The application server supports distributed unit of work </li>
|
||
|
<li>Either the application server does not support two-phase commit protocols
|
||
|
(protected connections) or the commitment control level of the program issuing
|
||
|
the connect is *NONE. </li>
|
||
|
</ul>
|
||
|
If running with commitment control, SQL will register a one-phase DRDA undetermined
|
||
|
resource. </li>
|
||
|
<li>The connection is to the local database or an application requester driver
|
||
|
(ARD) program and the connection is protected. It is unknown if committable
|
||
|
updates can be performed. If running with commitment control, SQL will register
|
||
|
a two-phase DRDA undetermined
|
||
|
resource. </li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
<div class="section"><p>The following table summarizes the type of connection that will
|
||
|
result for remote distributed unit of work connections. SQLERRD(4) is set
|
||
|
on successful CONNECT and SET CONNECTION statements. </p>
|
||
|
</div>
|
||
|
|
||
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="hsides" border="1" rules="all"><caption>Table 1. Summary of connection type</caption><thead align="left"><tr><th align="left" valign="bottom" width="19.94949494949495%" id="d0e202">Connect under Commitment Control</th>
|
||
|
<th align="left" valign="bottom" width="19.94949494949495%" id="d0e204">Application Server Supports Two-phase
|
||
|
Commit</th>
|
||
|
<th align="left" valign="bottom" width="19.94949494949495%" id="d0e206">Application Server Supports Distributed
|
||
|
Unit of Work</th>
|
||
|
<th align="left" valign="bottom" width="19.94949494949495%" id="d0e208">Other Updatable One-phase Resource Registered</th>
|
||
|
<th align="left" valign="bottom" width="20.2020202020202%" id="d0e210">SQLERRD(4)</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody><tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">No</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">2</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">Yes</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">2</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">No</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">4</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">Yes</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">4</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">No</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">2</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">Yes</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">2</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">No</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">4</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">Yes</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">4</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">No</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">1</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">Yes</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">2</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">No</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">4</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">Yes</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">4</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">No</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">N/A <sup>1</sup></td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">No</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">Yes</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">N/A <sup>1</sup></td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">No</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">3</td>
|
||
|
</tr>
|
||
|
<tr><td align="center" valign="top" width="19.94949494949495%" headers="d0e202 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e204 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e206 ">Yes</td>
|
||
|
<td align="center" valign="top" width="19.94949494949495%" headers="d0e208 ">Yes</td>
|
||
|
<td align="center" valign="top" width="20.2020202020202%" headers="d0e210 ">3</td>
|
||
|
</tr>
|
||
|
<tr><td colspan="5" align="left" valign="top" headers="d0e202 d0e204 d0e206 d0e208 d0e210 "><sup>1</sup>DRDA
|
||
|
does not allow protected connections to be used to application servers which
|
||
|
only support remote unit of work (DRDA1). This includes all DB2 for <span class="keyword">iSeries</span> TCP/IP connections.</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafydistribsupport.htm" title="DB2 UDB for iSeries supports two levels of distributed relational database.">Distributed support</a></div>
|
||
|
</div>
|
||
|
<div class="relref"><strong>Related reference</strong><br />
|
||
|
<div><a href="rbafyaccrdi.htm" title="In interactive SQL, you can communicate with a remote relational database by using the SQL CONNECT statement. Interactive SQL uses the CONNECT (Type 2) semantics (distributed unit of work) for CONNECT statements.">Access remote databases with interactive SQL</a></div>
|
||
|
</div>
|
||
|
<div class="relinfo"><strong>Related information</strong><br />
|
||
|
<div><a href="../rzakj/rzakjcommitkickoff.htm">Commitment control</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|