ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakj_5.4.0.1/rzakjtwophase.htm

111 lines
7.3 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="concept" />
<meta name="DC.Title" content="Two-phase commitment control" />
<meta name="abstract" content="Two-phase commitment control ensures that committable resources on multiple systems remain synchronized." />
<meta name="description" content="Two-phase commitment control ensures that committable resources on multiple systems remain synchronized." />
<meta name="DC.Relation" scheme="URI" content="rzakjconcepts.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjroles.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjstates.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjcommitdefs_tp.htm" />
<meta name="DC.Relation" scheme="URI" content="http://www.opengroup.org/" />
<meta name="DC.Relation" scheme="URI" content="../cl/strcmtctl.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzakjtwophase" />
<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>Two-phase commitment control</title>
</head>
<body id="rzakjtwophase"><a name="rzakjtwophase"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Two-phase commitment control</h1>
<div><p>Two-phase commitment control ensures that committable resources
on multiple systems remain synchronized.</p>
<p>i5/OS™ supports two-phase commit in accordance with
the SNA LU 6.2 architecture. For more detailed information about the internal
protocols used by the system for two-phase commit, see the <cite>SNA Transaction
Programmer's Reference for LU Type 6.2, GC30-3084-05</cite>. All supported
releases of i5/OS support
the Presumed Nothing protocols of SNA LU 6.2 and the Presumed Abort protocols
of SNA LU 6.2.</p>
<p>Two-phase commit is also supported using TCP/IP as a Distributed Unit of
Work (DUW) <em>Distributed
Relational Database Architecture™ (DRDA<sup>®</sup>)</em> protocol. To use TCP/IP DUW connections,
all of the systems (both the application requester and the application server)
must be at V5R1M0 or newer. For more information about DRDA, see the Open Group Technical Standard, <cite>DRDA V2
Vol. 1: Distributed
Relational Database Architecture</cite> at the Open Group Web site.</p>
<p>Under two-phase commit, the system performs the commit operation in two
waves:</p>
<ul><li>During the <em>prepare wave</em>, a resource manager issues a commit request
to its transaction manager. The transaction manager informs any other resources
it manages and the other transaction managers that the transaction is ready
to be committed. All the resource managers must respond that they are ready
to commit. This is called the <em>vote</em>.</li>
<li>During the <em>committed wave</em>, the transaction manager that initiates
the commit request decides what to do, based on the outcome of the prepare
wave. If the prepare wave completes successfully and all participants vote
ready, the transaction manager instructs all the resources it manages and
the other transaction managers to commit the transaction. If the prepare wave
does not complete successfully, all the transaction managers and resource
managers are instructed to roll back the transaction.</li>
</ul>
<div class="section"><h4 class="sectiontitle">Commit and rollback operations with remote resources</h4><p>When
remote resources are under commitment control, the initiator sends a commit
request to all remote agents. The request is sent throughout the transaction
program network. Each agent responds with the results of the commit operation.</p>
<p>If
errors occur during the prepare wave, the initiator sends a rollback request
to all agents. If errors occur during the committed wave, the system attempts
to bring as many locations as possible to committed status. These attempts
might result in a heuristic mixed state. See States of the transaction for
two-phase commitment control for more information about the possible states.</p>
<p>Any
errors are sent back to the initiator where they are signaled to the user.
If a default journal was specified on the Start Commitment Control (STRCMTCTL)
command, C LW entries are written. If errors occur, these entries are written,
even if OMTJRNE(*LUWID) was specified. You can use these entries, along with
the error messages and the status information for the commitment definition,
to attempt to synchronize the committable resources manually.</p>
<p>When remote
resources are under commitment control, the initiator sends a rollback request
to all remote agents. The request is sent throughout the transaction program
network. Each agent responds with the results of the rollback operation.</p>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rzakjroles.htm">Roles in commit processing</a></strong><br />
If a commit of a transaction involves more than one resource manager, each resource manager plays a role in the transaction. A resource manager is responsible for committing or rolling back changes made during the transaction.</li>
<li class="ulchildlink"><strong><a href="rzakjstates.htm">States of the transaction for two-phase commitment control</a></strong><br />
A commitment definition is established at each location that is part of the transaction program network. For each commitment definition, the system keeps track of the state of its current transaction and previous transaction.</li>
<li class="ulchildlink"><strong><a href="rzakjcommitdefs_tp.htm">Commitment definitions for two-phase commitment control</a></strong><br />
After you start commitment control, you can use the Change Commitment Options (QTNCHGCO) API to change the commitment options for your transaction.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakjconcepts.htm" title="This topic provides information to help you understand how commitment control works, how it interacts with your system, and how it interacts with other systems in your network.">Commitment control concepts</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="http://www.opengroup.org/" target="_blank">Open Group Web site</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="../cl/strcmtctl.htm">Start Commitment Control (STRCMTCTL) command</a></div>
</div>
</div>
</body>
</html>