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>Environment infrastructure</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="Berkeley DB Programmer's Reference Guide" /> 10 <link rel="up" href="transapp.html" title="Chapter��11.�� Berkeley DB Transactional Data Store Applications" /> 11 <link rel="prev" href="transapp_nested.html" title="Nested transactions" /> 12 <link rel="next" href="transapp_deadlock.html" title="Deadlock detection" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">Environment infrastructure</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="transapp_nested.html">Prev</a>��</td> 22 <th width="60%" align="center">Chapter��11.�� 23 Berkeley DB Transactional Data Store Applications 24 </th> 25 <td width="20%" align="right">��<a accesskey="n" href="transapp_deadlock.html">Next</a></td> 26 </tr> 27 </table> 28 <hr /> 29 </div> 30 <div class="sect1" lang="en" xml:lang="en"> 31 <div class="titlepage"> 32 <div> 33 <div> 34 <h2 class="title" style="clear: both"><a id="transapp_admin"></a>Environment infrastructure</h2> 35 </div> 36 </div> 37 </div> 38 <p>When building transactional applications, it is usually necessary to 39build an administrative infrastructure around the database environment. 40There are five components to this infrastructure, and each is 41supported by the Berkeley DB package in two different ways: a standalone 42utility and one or more library interfaces.</p> 43 <div class="itemizedlist"> 44 <ul type="disc"> 45 <li>Deadlock detection: <a href="../api_reference/C/db_deadlock.html" class="olink">db_deadlock utility</a>, <a href="../api_reference/C/lockdetect.html" class="olink">DB_ENV->lock_detect()</a>, <a href="../api_reference/C/envset_lk_detect.html" class="olink">DB_ENV->set_lk_detect()</a></li> 46 <li>Checkpoints: the <a href="../api_reference/C/db_checkpoint.html" class="olink">db_checkpoint utility</a>, <a href="../api_reference/C/txncheckpoint.html" class="olink">DB_ENV->txn_checkpoint()</a></li> 47 <li>Database and log file archival: the <a href="../api_reference/C/db_archive.html" class="olink">db_archive utility</a>, <a href="../api_reference/C/logarchive.html" class="olink">DB_ENV->log_archive()</a></li> 48 <li>Log file removal: <a href="../api_reference/C/db_archive.html" class="olink">db_archive utility</a>, <a href="../api_reference/C/logarchive.html" class="olink">DB_ENV->log_archive()</a></li> 49 <li>Recovery procedures: <a href="../api_reference/C/db_recover.html" class="olink">db_recover utility</a>, <a href="../api_reference/C/envopen.html" class="olink">DB_ENV->open()</a></li> 50 </ul> 51 </div> 52 <p>When writing multithreaded server applications and/or applications 53intended for download from the Web, it is usually simpler to create 54local threads that are responsible for administration of the database 55environment as scheduling is often simpler in a single-process model, 56and only a single binary need be installed and run. However, the 57supplied utilities can be generally useful tools even when the 58application is responsible for doing its own administration because 59applications rarely offer external interfaces to database 60administration. The utilities are required when programming to a Berkeley DB 61scripting interface because the scripting APIs do not always offer 62interfaces to the administrative functionality.</p> 63 </div> 64 <div class="navfooter"> 65 <hr /> 66 <table width="100%" summary="Navigation footer"> 67 <tr> 68 <td width="40%" align="left"><a accesskey="p" href="transapp_nested.html">Prev</a>��</td> 69 <td width="20%" align="center"> 70 <a accesskey="u" href="transapp.html">Up</a> 71 </td> 72 <td width="40%" align="right">��<a accesskey="n" href="transapp_deadlock.html">Next</a></td> 73 </tr> 74 <tr> 75 <td width="40%" align="left" valign="top">Nested transactions��</td> 76 <td width="20%" align="center"> 77 <a accesskey="h" href="index.html">Home</a> 78 </td> 79 <td width="40%" align="right" valign="top">��Deadlock detection</td> 80 </tr> 81 </table> 82 </div> 83 </body> 84</html> 85