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