1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6    <title>Getting Started with Berkeley DB Transaction Processing</title>
7    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
8    <meta name="generator" content="DocBook XSL Stylesheets V1.62.4" />
9    <link rel="home" href="index.html" title="Getting Started with Berkeley DB Transaction Processing" />
10    <link rel="next" href="preface.html" title="Preface" />
11  </head>
12  <body>
13    <div class="navheader">
14      <table width="100%" summary="Navigation header">
15        <tr>
16          <th colspan="3" align="center">Getting Started with Berkeley DB Transaction Processing</th>
17        </tr>
18        <tr>
19          <td width="20%" align="left"> </td>
20          <th width="60%" align="center"> </th>
21          <td width="20%" align="right"> <a accesskey="n" href="preface.html">Next</a></td>
22        </tr>
23      </table>
24      <hr />
25    </div>
26    <div class="book" lang="en" xml:lang="en">
27      <div class="titlepage">
28        <div>
29          <div>
30            <h1 class="title"><a id="id613728"></a>Getting Started with Berkeley DB Transaction Processing</h1>
31          </div>
32          <div>
33            <div class="legalnotice">
34              <p class="legalnotice-title">
35                <b>Legal Notice</b>
36              </p>
37              <p>
38        This documentation is distributed under an open source license.
39        You may review the terms of this license at:
40        <a href="http://www.oracle.com/technology/software/products/berkeley-db/htdocs/oslicense.html" target="_top">http://www.oracle.com/technology/software/products/berkeley-db/htdocs/oslicense.html</a>
41        
42        
43    </p>
44              <p>
45            Oracle, Berkeley DB,
46            
47            
48            and
49            Sleepycat are trademarks or registered trademarks of
50            Oracle. All rights to these marks are reserved.
51            No third-party use is permitted without the
52            express prior written consent of Oracle.
53    </p>
54              <p>
55        <span class="trademark">Java</span>™ and all Java-based marks are a trademark
56        or registered trademark of Sun Microsystems,
57        Inc, in the United States and other countries.
58    </p>
59              <p>
60        To obtain a copy of this document's original source code, please
61        submit a request to the Oracle Technology Network forum at:
62        <a href="http://forums.oracle.com/forums/forum.jspa?forumID=271" target="_top">http://forums.oracle.com/forums/forum.jspa?forumID=271</a>
63        
64        
65    </p>
66            </div>
67          </div>
68          <div>
69            <p class="pubdate">4/25/2008</p>
70          </div>
71        </div>
72        <div></div>
73        <hr />
74      </div>
75      <div class="toc">
76        <p>
77          <b>Table of Contents</b>
78        </p>
79        <dl>
80          <dt>
81            <span class="preface">
82              <a href="preface.html">Preface</a>
83            </span>
84          </dt>
85          <dd>
86            <dl>
87              <dt>
88                <span class="sect1">
89                  <a href="preface.html#conventions">Conventions Used in this Book</a>
90                </span>
91              </dt>
92              <dd>
93                <dl>
94                  <dt>
95                    <span class="sect2">
96                      <a href="preface.html#moreinfo">For More Information</a>
97                    </span>
98                  </dt>
99                </dl>
100              </dd>
101            </dl>
102          </dd>
103          <dt>
104            <span class="chapter">
105              <a href="introduction.html">1. Introduction</a>
106            </span>
107          </dt>
108          <dd>
109            <dl>
110              <dt>
111                <span class="sect1">
112                  <a href="introduction.html#txnintro">Transaction Benefits</a>
113                </span>
114              </dt>
115              <dd>
116                <dl>
117                  <dt>
118                    <span class="sect2">
119                      <a href="introduction.html#sysfailure">A Note on System Failure</a>
120                    </span>
121                  </dt>
122                  <dt>
123                    <span class="sect2">
124                      <a href="introduction.html#apireq">Application Requirements</a>
125                    </span>
126                  </dt>
127                  <dt>
128                    <span class="sect2">
129                      <a href="introduction.html#multithread-intro">Multi-threaded 
130        and Multi-process
131        Applications</a>
132                    </span>
133                  </dt>
134                </dl>
135              </dd>
136              <dt>
137                <span class="sect1">
138                  <a href="recovery-intro.html">Recoverability</a>
139                </span>
140              </dt>
141              <dt>
142                <span class="sect1">
143                  <a href="perftune-intro.html">Performance Tuning</a>
144                </span>
145              </dt>
146            </dl>
147          </dd>
148          <dt>
149            <span class="chapter">
150              <a href="enabletxn.html">2. Enabling Transactions</a>
151            </span>
152          </dt>
153          <dd>
154            <dl>
155              <dt>
156                <span class="sect1">
157                  <a href="enabletxn.html#environments">Environments</a>
158                </span>
159              </dt>
160              <dd>
161                <dl>
162                  <dt>
163                    <span class="sect2">
164                      <a href="enabletxn.html#filenaming">File Naming</a>
165                    </span>
166                  </dt>
167                  <dt>
168                    <span class="sect2">
169                      <a href="enabletxn.html#errorsupport">Error Support</a>
170                    </span>
171                  </dt>
172                  <dt>
173                    <span class="sect2">
174                      <a href="enabletxn.html#sharedmemory">Shared Memory Regions</a>
175                    </span>
176                  </dt>
177                  <dt>
178                    <span class="sect2">
179                      <a href="enabletxn.html#security">Security Considerations</a>
180                    </span>
181                  </dt>
182                </dl>
183              </dd>
184              <dt>
185                <span class="sect1">
186                  <a href="envopen.html">Opening a Transactional Environment and
187            
188            Store or Database
189            
190        </a>
191                </span>
192              </dt>
193            </dl>
194          </dd>
195          <dt>
196            <span class="chapter">
197              <a href="usingtxns.html">3. Transaction Basics</a>
198            </span>
199          </dt>
200          <dd>
201            <dl>
202              <dt>
203                <span class="sect1">
204                  <a href="usingtxns.html#commitresults">Committing a Transaction</a>
205                </span>
206              </dt>
207              <dd>
208                <dl>
209                  <dt>
210                    <span class="sect2">
211                      <a href="usingtxns.html#nodurabletxn">Non-Durable Transactions</a>
212                    </span>
213                  </dt>
214                </dl>
215              </dd>
216              <dt>
217                <span class="sect1">
218                  <a href="abortresults.html">Aborting a Transaction</a>
219                </span>
220              </dt>
221              <dt>
222                <span class="sect1">
223                  <a href="autocommit.html">Auto Commit</a>
224                </span>
225              </dt>
226              <dt>
227                <span class="sect1">
228                  <a href="nestedtxn.html">Nested Transactions</a>
229                </span>
230              </dt>
231              <dt>
232                <span class="sect1">
233                  <a href="txncursor.html">Transactional Cursors</a>
234                </span>
235              </dt>
236              <dd>
237                <dl>
238                  <dt>
239                    <span class="sect2">
240                      <a href="txncursor.html#dplcursors">Using Transactional DPL Cursors</a>
241                    </span>
242                  </dt>
243                </dl>
244              </dd>
245              <dt>
246                <span class="sect1">
247                  <a href="txnindices.html">Secondary Indices with Transaction Applications</a>
248                </span>
249              </dt>
250              <dt>
251                <span class="sect1">
252                  <a href="maxtxns.html">Configuring the Transaction Subsystem</a>
253                </span>
254              </dt>
255            </dl>
256          </dd>
257          <dt>
258            <span class="chapter">
259              <a href="txnconcurrency.html">4. Concurrency</a>
260            </span>
261          </dt>
262          <dd>
263            <dl>
264              <dt>
265                <span class="sect1">
266                  <a href="txnconcurrency.html#concurrenthandles">Which DB Handles are Free-Threaded</a>
267                </span>
268              </dt>
269              <dt>
270                <span class="sect1">
271                  <a href="blocking_deadlocks.html">Locks, Blocks, and Deadlocks</a>
272                </span>
273              </dt>
274              <dd>
275                <dl>
276                  <dt>
277                    <span class="sect2">
278                      <a href="blocking_deadlocks.html#locks">Locks</a>
279                    </span>
280                  </dt>
281                  <dt>
282                    <span class="sect2">
283                      <a href="blocking_deadlocks.html#blocks">Blocks</a>
284                    </span>
285                  </dt>
286                  <dt>
287                    <span class="sect2">
288                      <a href="blocking_deadlocks.html#deadlocks">Deadlocks</a>
289                    </span>
290                  </dt>
291                </dl>
292              </dd>
293              <dt>
294                <span class="sect1">
295                  <a href="lockingsubsystem.html">The Locking Subsystem</a>
296                </span>
297              </dt>
298              <dd>
299                <dl>
300                  <dt>
301                    <span class="sect2">
302                      <a href="lockingsubsystem.html#configuringlock">Configuring the Locking Subsystem</a>
303                    </span>
304                  </dt>
305                  <dt>
306                    <span class="sect2">
307                      <a href="lockingsubsystem.html#configdeadlkdetect">Configuring Deadlock Detection</a>
308                    </span>
309                  </dt>
310                  <dt>
311                    <span class="sect2">
312                      <a href="lockingsubsystem.html#deadlockresolve">Resolving Deadlocks</a>
313                    </span>
314                  </dt>
315                </dl>
316              </dd>
317              <dt>
318                <span class="sect1">
319                  <a href="isolation.html">Isolation</a>
320                </span>
321              </dt>
322              <dd>
323                <dl>
324                  <dt>
325                    <span class="sect2">
326                      <a href="isolation.html#degreesofisolation">Supported Degrees of Isolation</a>
327                    </span>
328                  </dt>
329                  <dt>
330                    <span class="sect2">
331                      <a href="isolation.html#dirtyreads">Reading Uncommitted Data</a>
332                    </span>
333                  </dt>
334                  <dt>
335                    <span class="sect2">
336                      <a href="isolation.html#readcommitted">Committed Reads</a>
337                    </span>
338                  </dt>
339                  <dt>
340                    <span class="sect2">
341                      <a href="isolation.html#snapshot_isolation">Using Snapshot Isolation</a>
342                    </span>
343                  </dt>
344                </dl>
345              </dd>
346              <dt>
347                <span class="sect1">
348                  <a href="txn_ccursor.html">Transactional Cursors and Concurrent Applications</a>
349                </span>
350              </dt>
351              <dd>
352                <dl>
353                  <dt>
354                    <span class="sect2">
355                      <a href="txn_ccursor.html#cursordirtyreads">Using Cursors with Uncommitted Data</a>
356                    </span>
357                  </dt>
358                </dl>
359              </dd>
360              <dt>
361                <span class="sect1">
362                  <a href="readmodifywrite.html">Read/Modify/Write</a>
363                </span>
364              </dt>
365              <dt>
366                <span class="sect1">
367                  <a href="txnnowait.html">No Wait on Blocks</a>
368                </span>
369              </dt>
370              <dt>
371                <span class="sect1">
372                  <a href="reversesplit.html">Reverse BTree Splits</a>
373                </span>
374              </dt>
375            </dl>
376          </dd>
377          <dt>
378            <span class="chapter">
379              <a href="filemanagement.html">5. Managing DB Files</a>
380            </span>
381          </dt>
382          <dd>
383            <dl>
384              <dt>
385                <span class="sect1">
386                  <a href="filemanagement.html#checkpoints">Checkpoints</a>
387                </span>
388              </dt>
389              <dt>
390                <span class="sect1">
391                  <a href="backuprestore.html">Backup Procedures</a>
392                </span>
393              </dt>
394              <dd>
395                <dl>
396                  <dt>
397                    <span class="sect2">
398                      <a href="backuprestore.html#copyutilities">About Unix Copy Utilities</a>
399                    </span>
400                  </dt>
401                  <dt>
402                    <span class="sect2">
403                      <a href="backuprestore.html#standardbackup">Offline Backups</a>
404                    </span>
405                  </dt>
406                  <dt>
407                    <span class="sect2">
408                      <a href="backuprestore.html#hotbackup">Hot Backup</a>
409                    </span>
410                  </dt>
411                  <dt>
412                    <span class="sect2">
413                      <a href="backuprestore.html#incrementalbackups">Incremental Backups</a>
414                    </span>
415                  </dt>
416                </dl>
417              </dd>
418              <dt>
419                <span class="sect1">
420                  <a href="recovery.html">Recovery Procedures</a>
421                </span>
422              </dt>
423              <dd>
424                <dl>
425                  <dt>
426                    <span class="sect2">
427                      <a href="recovery.html#normalrecovery">Normal Recovery</a>
428                    </span>
429                  </dt>
430                  <dt>
431                    <span class="sect2">
432                      <a href="recovery.html#catastrophicrecovery">Catastrophic Recovery</a>
433                    </span>
434                  </dt>
435                </dl>
436              </dd>
437              <dt>
438                <span class="sect1">
439                  <a href="architectrecovery.html">Designing Your Application for Recovery</a>
440                </span>
441              </dt>
442              <dd>
443                <dl>
444                  <dt>
445                    <span class="sect2">
446                      <a href="architectrecovery.html#multithreadrecovery">Recovery for Multi-Threaded Applications</a>
447                    </span>
448                  </dt>
449                  <dt>
450                    <span class="sect2">
451                      <a href="architectrecovery.html#multiprocessrecovery">Recovery in Multi-Process Applications</a>
452                    </span>
453                  </dt>
454                </dl>
455              </dd>
456              <dt>
457                <span class="sect1">
458                  <a href="hotfailover.html">Using Hot Failovers</a>
459                </span>
460              </dt>
461              <dt>
462                <span class="sect1">
463                  <a href="logfileremoval.html">Removing Log Files</a>
464                </span>
465              </dt>
466              <dt>
467                <span class="sect1">
468                  <a href="logconfig.html">Configuring the Logging Subsystem</a>
469                </span>
470              </dt>
471              <dd>
472                <dl>
473                  <dt>
474                    <span class="sect2">
475                      <a href="logconfig.html#logfilesize">Setting the Log File Size</a>
476                    </span>
477                  </dt>
478                  <dt>
479                    <span class="sect2">
480                      <a href="logconfig.html#logregionsize">Configuring the Logging Region Size</a>
481                    </span>
482                  </dt>
483                  <dt>
484                    <span class="sect2">
485                      <a href="logconfig.html#inmemorylogging">Configuring In-Memory Logging</a>
486                    </span>
487                  </dt>
488                  <dt>
489                    <span class="sect2">
490                      <a href="logconfig.html#logbuffer">Setting the In-Memory Log Buffer Size</a>
491                    </span>
492                  </dt>
493                </dl>
494              </dd>
495            </dl>
496          </dd>
497          <dt>
498            <span class="chapter">
499              <a href="wrapup.html">6. Summary and Examples</a>
500            </span>
501          </dt>
502          <dd>
503            <dl>
504              <dt>
505                <span class="sect1">
506                  <a href="wrapup.html#anatomy">Anatomy of a Transactional Application</a>
507                </span>
508              </dt>
509              <dt>
510                <span class="sect1">
511                  <a href="txnexample_java.html">Base API Transaction Example</a>
512                </span>
513              </dt>
514              <dd>
515                <dl>
516                  <dt>
517                    <span class="sect2">
518                      <a href="txnexample_java.html#txnguideexample">TxnGuide.java</a>
519                    </span>
520                  </dt>
521                  <dt>
522                    <span class="sect2">
523                      <a href="txnexample_java.html#payloaddata">PayloadData.java</a>
524                    </span>
525                  </dt>
526                  <dt>
527                    <span class="sect2">
528                      <a href="txnexample_java.html#dbwriter">DBWriter.java</a>
529                    </span>
530                  </dt>
531                </dl>
532              </dd>
533              <dt>
534                <span class="sect1">
535                  <a href="txnexample_dpl.html">DPL Transaction Example</a>
536                </span>
537              </dt>
538              <dd>
539                <dl>
540                  <dt>
541                    <span class="sect2">
542                      <a href="txnexample_dpl.html#txnguideexample_dpl">TxnGuide.java</a>
543                    </span>
544                  </dt>
545                  <dt>
546                    <span class="sect2">
547                      <a href="txnexample_dpl.html#payloaddataentity">PayloadDataEntity.java</a>
548                    </span>
549                  </dt>
550                  <dt>
551                    <span class="sect2">
552                      <a href="txnexample_dpl.html#storewriter">StoreWriter.java</a>
553                    </span>
554                  </dt>
555                </dl>
556              </dd>
557              <dt>
558                <span class="sect1">
559                  <a href="inmem_txnexample_java.html">Base API In-Memory Transaction Example</a>
560                </span>
561              </dt>
562            </dl>
563          </dd>
564        </dl>
565      </div>
566    </div>
567    <div class="navfooter">
568      <hr />
569      <table width="100%" summary="Navigation footer">
570        <tr>
571          <td width="40%" align="left"> </td>
572          <td width="20%" align="center"> </td>
573          <td width="40%" align="right"> <a accesskey="n" href="preface.html">Next</a></td>
574        </tr>
575        <tr>
576          <td width="40%" align="left" valign="top"> </td>
577          <td width="20%" align="center"> </td>
578          <td width="40%" align="right" valign="top"> Preface</td>
579        </tr>
580      </table>
581    </div>
582  </body>
583</html>
584