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