ibm-information-center/dist/eclipse/plugins/i5OS.ic.sqlp_5.4.0.1/rbafyindexrecovery.htm

84 lines
5.9 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="Index recovery" />
<meta name="abstract" content="DB2 UDB for iSeries supplies several functions to deal with index recovery." />
<meta name="description" content="DB2 UDB for iSeries supplies several functions to deal with index recovery." />
<meta name="DC.subject" content="index, recovery, data integrity, index recovery, Edit Recovery for Access Paths (EDTRCYAP) command, command (CL), Edit Recovery for Access Paths (EDTRCYAP), EDTRCYAP (Edit Recovery for Access Paths), Start Journal Access Path (STRJRNAP) command, command (CL), Start Journal Access Path (STRJRNAP), STRJRNAP (Start Journal Access Path), journaling, rebuild, save and restore" />
<meta name="keywords" content="index, recovery, data integrity, index recovery, Edit Recovery for Access Paths (EDTRCYAP) command, command (CL), Edit Recovery for Access Paths (EDTRCYAP), EDTRCYAP (Edit Recovery for Access Paths), Start Journal Access Path (STRJRNAP) command, command (CL), Start Journal Access Path (STRJRNAP), STRJRNAP (Start Journal Access Path), journaling, rebuild, save and restore" />
<meta name="DC.Relation" scheme="URI" content="rbafydataintex.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="rbafyindexrecovery" />
<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>Index recovery</title>
</head>
<body id="rbafyindexrecovery"><a name="rbafyindexrecovery"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Index recovery</h1>
<div><p><span class="keyword">DB2<sup>®</sup> UDB for iSeries™</span> supplies
several functions to deal with index recovery. </p>
<div class="section"><ul><li>System managed index protection <p>The EDTRCYAP CL command allows a user
to instruct <span class="keyword">DB2 UDB for iSeries</span> to guarantee
that in the event of a system or power failure, the amount of time required
to recover all indexes on the system is kept below a specified time. The system
automatically journals enough information in a system journal to limit the
recovery time to the specified amount.</p>
</li>
<li>Journaling of indexes <p><span class="keyword">DB2 UDB for iSeries</span> supplies
an index journaling function that makes it unnecessary to rebuild an entire
index due to a power or system failure. If the index is journaled, the system
database support automatically makes sure the index is in synchronization
with the data in the tables without having to rebuild it from scratch. SQL
indexes are <em>not</em> journaled automatically. You can, however, use the
CL command Start Journal Access Path (STRJRNAP) to journal any index created
by <span class="keyword">DB2 UDB for iSeries</span>.</p>
</li>
<li>Index rebuild <p>All indexes on the system have a maintenance option
that specifies when an index is maintained. SQL indexes are created with
an attribute of *IMMED maintenance.</p>
<p>In the event of a power failure
or abnormal system failure, if indexes were not protected by one of the previously
described techniques, those indexes in the process of change may need to be
rebuilt by the database manager to make sure they agree with the actual data.
All indexes on the system have a recovery option that specifies when an index
should be rebuilt if necessary. All SQL indexes with an attribute of UNIQUE
are created with a recovery attribute of *IPL (this means that these indexes
are rebuilt before the <span class="keyword">OS/400<sup>®</sup></span> operating
system been started). All other SQL indexes are created with the *AFTIPL
recovery option (this means that after the operating system has been started,
indexes are asynchronously rebuilt). During an IPL, the operator can see
a display showing indexes needing to be rebuilt and their recovery option.
The operator can override the recovery options.</p>
</li>
<li>Save and restore of indexes <p>The save/restore function allows you to
save indexes when a table is saved by using ACCPTH(*YES) on the Save Object
(SAVOBJ) or Save Library (SAVLIB) CL commands. In the event of a restore
when the indexes have also been saved, there is no need to rebuild the indexes.
Any indexes not previously saved and restored are automatically and asynchronously
rebuilt by the database manager.</p>
</li>
</ul>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafydataintex.htm" title="Data integrity protects data from being destroyed or changed by unauthorized persons, system operation or hardware failures (such as physical damage to a disk), programming errors, interruptions before a job is completed (such as a power failure), or interference from running applications at the same time (such as serialization problems).">Data integrity</a></div>
</div>
</div>
</body>
</html>