ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaki_5.4.0.1/rzakipartialtrans.htm

166 lines
12 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="Example: Recover objects with partial transactions" />
<meta name="abstract" content="If you restore an object that was saved with a save-while-active operation that specified that the object can be saved before it reaches a commitment boundary, it can have partial transactions. To recover objects that are in a partial state you must perform an apply or a remove journaled changes operation." />
<meta name="description" content="If you restore an object that was saved with a save-while-active operation that specified that the object can be saved before it reaches a commitment boundary, it can have partial transactions. To recover objects that are in a partial state you must perform an apply or a remove journaled changes operation." />
<meta name="DC.Relation" scheme="URI" content="rzakiapyjrnchg.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakireasons.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakijrnswa.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakiautodelete.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakichgjrnobj.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakijrnrcvchn.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakisavjrnrcv.htm" />
<meta name="DC.Relation" scheme="URI" content="../rzai8/rzai8overview.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="rzakipartialtrans" />
<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>Example: Recover objects with partial transactions</title>
</head>
<body id="rzakipartialtrans"><a name="rzakipartialtrans"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Example: Recover objects with partial transactions</h1>
<div><p>If you restore an object that was saved with a save-while-active
operation that specified that the object can be saved before it reaches a
commitment boundary, it can have partial transactions. To recover objects
that are in a partial state you must perform an apply or a remove journaled
changes operation.</p>
<div class="section"><p>Another reason that an object can have partial transactions is
if a long-running rollback was forced to end. However, if an object has partial
transactions because of a long-running rollback, you cannot recover it with
an apply or remove journaled changes operation.</p>
<p>If you perform save-while-active
operations that can result in objects that are saved with partial transaction,
it is recommended that you use Backup, Recovery, and Media Services (BRMS).
You can use BRMS to automate your backup and recovery operations. BRMS automatically
applies changes to objects with partial transactions and restores them to
a usable state. For more detailed information see the BRMS topic.</p>
<div class="note"><span class="notetitle">Note:</span> By
using the code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code
license and disclaimer information</a>.</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakiapyjrnchg.htm" title="One of the primary advantages of journaling is its ability to return a journaled object to its current state since the last save.">Recover journaled objects</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rzakireasons.htm" title="The primary benefit of journal management is that it enables you to recover the changes to an object that have occurred since the object was last saved. This ability is especially useful if you have an unscheduled outage such as a power failure.">Benefits of journal management</a></div>
<div><a href="rzakijrnswa.htm" title="Journaling can help you with recovery if you use the save-while-active function in your backup strategy. If you plan to save an application without ending it for checkpoint processing, consider journaling all of the objects associated with the application. After the save operation is complete, save all of the journal receivers for the objects you are saving.">Journal management with the save-while-active function</a></div>
<div><a href="rzakiautodelete.htm" title="If you choose system journal receiver management, you can also have the system delete journal receivers that are no longer needed for recovery. You can only specify this if you are using system journal receiver management.">Automatic deletion of journal receivers</a></div>
<div><a href="rzakichgjrnobj.htm" title="Provides information about how to change the journaling attributes of a journaled object without ending journaling.">Change journaling attributes of journaled objects without ending journaling</a></div>
<div><a href="rzakijrnrcvchn.htm" title="Journal receivers that are associated with a journal (that is presently or previously attached to the journal) are linked in one or more receiver chains. Each journal receiver, except the first one, has a previous receiver that was detached when the current receiver was attached. Each journal receiver, except the one that is currently attached, also has a next receiver.">Keep track of journal receiver chains</a></div>
<div><a href="rzakisavjrnrcv.htm" title="You must save the journal receivers when they are no longer attached, so that you have all the journal entries saved.">Save journals and journal receivers</a></div>
<div><a href="../rzai8/rzai8overview.htm">BRMS topic</a></div>
</div>
</div><div class="nested1" xml:lang="en-us" id="requiredjournalrec"><a name="requiredjournalrec"><!-- --></a><h2 class="topictitle2">Required journal receivers</h2>
<div><div class="section"><p>When you recover objects with partial transactions, all of the
journal receivers that are required for the recovery operation must be on
the system. The recovery operation might require more journal receivers than
just the last one you detached. The system looks for the last journal receiver
with an journal entry for the object that indicates one of the following:</p>
<ul><li>The last regular save.</li>
<li>The last save-while-active in which the object was saved without any partial
transactions.</li>
<li>The earliest SC (start commit) entry for any open transactions that affect
the saved object for a save with partial transactions.</li>
</ul>
<p>The following illustration demonstrates these requirements.</p>
</div>
<ol><li><span>Starting with receiver MYRCV05 the apply journaled changes operation
starts.</span></li>
<li><span>The systems finds the SS entry that indicates the object was saved
with partial transactions.</span></li>
<li><span>If journal receiver MYRCV05 has the CM entry that indicates the
transaction for the object was committed, the apply journaled changes operation
applies the changes.</span></li>
<li><span>If journal receiver MYRCV05 does not have the CM entry, the system
looks back to previous journal receivers.</span></li>
<li><span>Since the SC entry is not in MYRCV04, the system looks in MYRCV03.</span></li>
<li><span>The system finds the SC entry in MYRCV03 and the transaction is
rolled back to that point.</span></li>
</ol>
<div class="section"><br /><img src="rzaki518.gif" alt="This figure illustrates that even though you are performing an apply journaled changes operation, it is still possible that the transaction can be rolled back and you will need previous journal receivers." /><br /><p>As the previous figure shows,
even if you are performing an apply journaled changes operation, it is still
possible that the transaction can be rolled back and you will need previous
journal receivers.</p>
</div>
</div>
</div>
<div class="nested1" xml:lang="en-us" id="restoreexamples"><a name="restoreexamples"><!-- --></a><h2 class="topictitle2">Restore examples</h2>
<div><div class="section"><p>All of the objects in the following examples are database files.
The following are examples of recovering objects in a partial state from three
possible scenarios:</p>
<ul><li>Restore of a single object with partial transactions.</li>
<li>Restore of multiple objects with partial transactions resulting from a
rollback that was forced to end.</li>
<li>Remove the partial transactions from an object that was restored with
partial transactions.</li>
</ul>
</div>
</div>
</div>
<div class="nested1" xml:lang="en-us" id="restoreparttransact"><a name="restoreparttransact"><!-- --></a><h2 class="topictitle2">Restore of a single object with partial transactions</h2>
<div><div class="section"><p>In this example, an object, OBJ1 in library LIB1 was saved with
a save-while-active operation while it had pending transactions. The save-while-active
operation is the object's most recent save. Journaled changes start from the
last save and end at the last sequence number in the journal receiver.</p>
<p>The
following is an example of the APYJRNCHG command. The default value for FROMENT
is *LASTSAVE. The TOENT parameter uses the *LASTRST value to apply journaled
changes up to the journal entry when the object was last restored.</p>
<pre> APYJRNCHG JRN(JRN1) FILE(LIB1/OBJ1)
FROMENT(*LASTSAVE) TOENT(*LASTRST)
RCVRNG(*LASTSAVE)</pre>
<p>The following is an example
of the RMVJRNCHG command. The following command removes the changes in journal
JRN1 from the all the members of OBJ1:</p>
<pre>RMVJRNCHG JRN(JRNA1) FILE(LIB1/OBJ1)
FROMENT(*LASTSAVE) TOENT(*COMMITSTART)
RCVRNG(*LASTSAVE)</pre>
<p>Starting with the last save journal
entry, only changes for journal entries for any partial transactions are removed,
back to the start of the commit transaction.</p>
</div>
</div>
</div>
<div class="nested1" xml:lang="en-us" id="removepartialtrans"><a name="removepartialtrans"><!-- --></a><h2 class="topictitle2">Remove partial transaction status from an object with partial transactions</h2>
<div><div class="section"><p>This example uses the Change Journal Object (CHGJRNOBJ) command
because the journal receivers are not available to perform an apply or remove
journaled changes operation. The Partial Transactions (PTLTNS) parameter allows
the object to be used, but does not complete the transactions. The object,
BRKNOBJ, still has changes caused by the partial transactions, but you are
able to open the file.</p>
<div class="attention"><span class="attentiontitle">Attention:</span> Only use the following command
as a last resort. You <strong>will lose data</strong> if you use this command. You should
only use this command for the following reasons: <ul><li>You have objects with partial transaction as a result of the termination
of a long-running rollback and you have no saved version to restore.</li>
<li>You have objects with partial transactions as a result of a save-while-active
operation, and the journal receivers required to apply or remove journaled
changes have been lost, destroyed, or damaged beyond repair.</li>
</ul>
</div>
<pre> CHGJRNOBJ OBJECT(LIB1/BRKNOBJ *FILE) PTLTNS(*ALWUSE)</pre>
<div class="note"><span class="notetitle">Note:</span> Read
the Code example disclaimer for important legal information.</div>
</div>
</div>
</div>
</body>
</html>