ibm-information-center/dist/eclipse/plugins/i5OS.ic.dbp_5.4.0.1/rbafoconcc.htm

83 lines
6.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="concept" />
<meta name="DC.Title" content="Lock shared data" />
<meta name="abstract" content="By definition, all database files can be used by many users at the same time. However, some operations can lock the file, member, or data records in a member to prevent them from being shared across jobs." />
<meta name="description" content="By definition, all database files can be used by many users at the same time. However, some operations can lock the file, member, or data records in a member to prevent them from being shared across jobs." />
<meta name="DC.subject" content="sharing, file, across jobs, locking, data, shared, database file, sharing across jobs, database, across jobs, determining, data sharing requirements, specifying, how a file is shared" />
<meta name="keywords" content="sharing, file, across jobs, locking, data, shared, database file, sharing across jobs, database, across jobs, determining, data sharing requirements, specifying, how a file is shared" />
<meta name="DC.Relation" scheme="URI" content="rbafopreopn.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafoconcrec.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafoconcfl.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafoconcmbr.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafoconcfmt.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafoapplck.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafodsplckrowon.htm" />
<meta name="DC.Relation" scheme="URI" content="rbafodsprcdlck.htm" />
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzmsth2lockt.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="rbafoconcc" />
<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>Lock shared data</title>
</head>
<body id="rbafoconcc"><a name="rbafoconcc"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Lock shared data</h1>
<div><p>By definition, all database files can be used by many users at
the same time. However, some operations can lock the file, member, or data
records in a member to prevent them from being shared across jobs.</p>
<p>When the file, member, or record is locked, no other job can read the same
data for update operations, which keeps another job from unintentionally deleting
the first job's update.</p>
<p>You can lock a row in iSeries™ Navigator by opening a table and editing
the row you want to lock, or use the SQL LOCK TABLE statement. You can also
use the following operations to lock files, members, or data records, and
display locked records using the Display Record Locks (DSPRCDLCK) command
or iSeries Navigator.</p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbafoconcrec.htm">Lock records</a></strong><br />
DB2
Universal Database™ for iSeries has built-in integrity for records. For example,
if PGMA reads a record for update operation, it locks that record. Another
program cannot read the same record for update operation until PGMA releases
the record, but another program can read the record just for inquiry.</li>
<li class="ulchildlink"><strong><a href="rbafoconcfl.htm">Lock files</a></strong><br />
Some file operations exclusively allocate the file for the length of the operation. When the file is allocated exclusively, any program trying to open the file has to wait until it is released. However, you can set a wait time for the file to become available using the WAITFILE parameter .</li>
<li class="ulchildlink"><strong><a href="rbafoconcmbr.htm">Lock members</a></strong><br />
Member operations (such as add and remove) automatically allocate the file exclusively enough to prevent other file operations from occurring at the same time. Input/output operations on the same member cannot be run, but input/output operations on other members of the same file can run at the same time.</li>
<li class="ulchildlink"><strong><a href="rbafoconcfmt.htm">Lock record format data</a></strong><br />
Sometimes you might want to lock the entire set of records associated with a record format (for example, all the records in a physical file). In this case, you can use the RCDFMTLCK parameter on the Override Database File (OVRDBF) command.</li>
<li class="ulchildlink"><strong><a href="rbafoapplck.htm">Database lock considerations</a></strong><br />
Listed here are the commonly used database functions and the types of locks they place on database files.</li>
<li class="ulchildlink"><strong><a href="rbafodsplckrowon.htm">Display locked rows using iSeries Navigator</a></strong><br />
Use this procedure to display locked rows using iSeries Navigator.</li>
<li class="ulchildlink"><strong><a href="rbafodsprcdlck.htm">Display locked records using the Display Record Locks (DSPRCDLCK) command</a></strong><br />
You can also use the Display Record Locks (DSPRCDLCK) command to display the current lock status (wait or held) of records for a physical file member.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbafopreopn.htm" title="These topics describe the file processing parameters and other methods or considerations that can affect database file processing.">Database file processing: Runtime considerations</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="../db2/rbafzmsth2lockt.htm">LOCK TABLE</a></div>
</div>
</div>
</body>
</html>