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