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

127 lines
8.5 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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="task" />
<meta name="DC.Title" content="When to force commits and rollbacks and when to cancel resynchronization" />
<meta name="abstract" content="You can find when and how to force a rollback or commit, and when to cancel resynchronization in this topic." />
<meta name="description" content="You can find when and how to force a rollback or commit, and when to cancel resynchronization in this topic." />
<meta name="DC.Relation" scheme="URI" content="rzakjtrouble.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjxatransaction.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjstartcommit.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjdeadlocks.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjrecovtrans.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjrecovtrans.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakjdspstatus.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="rzakjheuristic" />
<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>When to force commits and rollbacks and when to cancel resynchronization</title>
</head>
<body id="rzakjheuristic"><a name="rzakjheuristic"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">When to force commits and rollbacks and when to cancel resynchronization</h1>
<div><p> You can find when and how to force a rollback or commit, and when
to cancel resynchronization in this topic.</p>
<div class="section"><p>The decision to force a commit, roll back, or cancel resynchronization
is called a <dfn class="term">heuristic decision</dfn>. A heuristic decision is the action
that you take when you force the system to commit or to roll back a transaction.
When you make a heuristic decision, the state of the transaction becomes heuristic
mixed if your decision is inconsistent with the results of the other locations
in the transaction. You must take responsibility for determining the action
taken by all the other locations that participated in the transaction and
resynchronizing the database records.</p>
<p>Before you make a heuristic decision,
gather as much information as you can about the transaction. Display the jobs
that are associated with the commitment definition and make a record of what
journals and files are involved. You can use this information later if you
need to display journal entries and apply or remove journaled changes manually.</p>
<p>The
best place to find out information about a transaction is to look at the location
that was the initiator for that transaction. However, the decision to commit
or roll back might be owned by an API resource or by a last agent.</p>
<p>If
an API resource was registered as a last agent resource, the final decision
of whether to commit or roll back is owned by the API resource. You need to
look at information about the application and how it uses the API resource
to determine whether to commit or to roll back.</p>
<p>If the transaction has
a last agent selected, the last agent owns the decision to commit or roll
back. Look at the status of the last agent for information about the transaction.</p>
<p>When you must make heuristic decisions or cancel resynchronization
due to a system or communications failure that cannot be repaired, you can
find all transactions in doubt by using the following steps:</p>
</div>
<ol><li><span>In iSeries™ Navigator,
expand the system you want to work with.</span></li>
<li><span>Expand <span class="uicontrol">Databases</span> and the local database
for the system.</span></li>
<li><span>Expand <span class="uicontrol">Transactions.</span></span></li>
<li><span>Expand <span class="uicontrol">Database Transactions</span> or <span class="uicontrol">Global
Transactions</span>.</span></li>
</ol>
<div class="section"><p>In this display windows, you can see the commitment
definition, resynchronization status, the current unit of work ID, and the
current unit of work state for each transaction. Look for transactions with
the following information:</p>
<ul><li>Transactions with a <span class="uicontrol">Logical Unit of Work State</span> of
Prepared or Last Agent Pending.</li>
<li>Transactions that show <span class="uicontrol">Resynchronization in Progress</span> status
of yes.</li>
</ul>
<p>To work with the job that is participating in the transaction on this
system right-click the transaction and select <span class="uicontrol">job</span>.</p>
<p>When
you right-click the transaction, you can also select <span class="uicontrol">Force Commit</span>, <span class="uicontrol">Force
Rollback</span>, or <span class="uicontrol">Cancel Resynchronization.</span></p>
<p>Before
making a heuristic decision or canceling resynchronization, you might want
to check the status of the jobs on other systems associated with the transaction.
Checking the jobs on remote systems might help you avoid decisions that cause
database inconsistencies between systems.</p>
<ol><li>Right-click the transaction you want to work with.</li>
<li>Select <span class="uicontrol">Resource Status</span>.</li>
<li>In the Resource Status dialog, select the <span class="uicontrol">Conversation</span> tab
for SNA connections; select <span class="uicontrol">Connection</span> for TCP/IP connections.</li>
</ol>
<p>Each conversation resource represents a remote system that is participating
in the transaction. On the remote systems, you can use iSeries Navigator to see the transactions
associated with the transaction.</p>
<p>The base portion of the unit of work
ID is the same on all the systems. When you display commitment control information
on the remote system, look for the base portion of the unit of work ID that
is the same on the local system.</p>
<p>For example, if the unit of work ID
on the local system starts with: <samp class="codeph">APPN.RCHASL97.X'112233445566</samp>,
look for the unit of work ID on the remote system that also starts with <samp class="codeph">APPN.RCHASL97.X'112233445566</samp>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakjtrouble.htm" title="You can read this information when you need to troubleshoot commitment control.">Troubleshoot transactions and commitment control</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rzakjxatransaction.htm" title="DB2 Universal Database (UDB) for iSeries can participate in X/Open global transactions.">XA transaction support for commitment control</a></div>
<div><a href="rzakjstartcommit.htm" title="To start commitment control, use the Start Commitment Control (STRCMTCTL) Command.">Start commitment control</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="rzakjdeadlocks.htm" title="Find deadlock conditions by using these instructions.">Detect deadlocks</a></div>
<div><a href="rzakjrecovtrans.htm" title="You can use instructions in this topic to handle transactions performing work on a remote system after the communication with that system fails.">Recover transactions after communications failure</a></div>
<div><a href="rzakjdspstatus.htm" title="You can use iSeries Navigator to display information about all transactions (logical units of work) on the system. You can also look at information about the job, if any, associated with a transaction.">Display commitment control information</a></div>
</div>
</div>
</body>
</html>