~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/tcl/docs/env.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--Copyright 1999-2002 by Sleepycat Software, Inc.-->
2
 
<!--All rights reserved.-->
3
 
<html>
4
 
<head>
5
 
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6
 
   <meta name="GENERATOR" content="Mozilla/4.75 [en] (X11; U; Linux 2.2.16-22 i686) [Netscape]">
7
 
</head>
8
 
<body>
9
 
 
10
 
<h2>
11
 
Environment Commands</h2>
12
 
Environments provide a structure for creating a consistent environment
13
 
for processes using one or more of the features of Berkeley DB.&nbsp; Unlike
14
 
some of the database commands, the environment commands are very low level.
15
 
<br>
16
 
<hr WIDTH="100%">
17
 
<p>The user may create and open a new DB environment&nbsp; by invoking:
18
 
<p><b>> berkdb env</b>
19
 
<br><b>&nbsp;&nbsp;&nbsp; [-cdb] [-cdb_alldb] [-lock] [-log] [-txn [nosync]]</b>
20
 
<br><b>&nbsp;&nbsp;&nbsp; [-create] [-home<i> directory</i>] [-mode <i>mode</i>]</b>
21
 
<br><b>&nbsp;&nbsp;&nbsp; [-data_dir <i>directory</i>] [-log_dir <i>directory</i>]
22
 
[-tmp_dir <i>directory</i>]</b>
23
 
<br><b>&nbsp;&nbsp;&nbsp; [-nommap] [-private] [-recover] [-recover_fatal]
24
 
[-system_mem] [-errfile <i>filename</i>]</b>
25
 
<br><b>&nbsp;&nbsp;&nbsp; [-use_environ] [-use_environ_root] [-verbose
26
 
{<i>which </i>on|off}]</b>
27
 
<br><b>&nbsp;&nbsp;&nbsp; [-region_init]</b>
28
 
<br><b>&nbsp;&nbsp;&nbsp; [-cachesize {<i>gbytes bytes ncaches</i>}]</b>
29
 
<br><b>&nbsp;&nbsp;&nbsp; [-mmapsize<i> size</i>]</b>
30
 
<br><b>&nbsp;&nbsp;&nbsp; [-log_max <i>max</i>]</b>
31
 
<br><b>&nbsp;&nbsp;&nbsp; [-log_buffer <i>size</i>]</b>
32
 
<br><b>&nbsp;&nbsp;&nbsp; [-lock_conflict {<i>nmodes </i>{<i>matrix</i>}}]</b>
33
 
<br><b>&nbsp;&nbsp;&nbsp; [-lock_detect default|oldest|random|youngest]</b>
34
 
<br><b>&nbsp;&nbsp;&nbsp; [-lock_max <i>max</i>]</b>
35
 
<br><b>&nbsp;&nbsp;&nbsp; [-lock_max_locks <i>max</i>]</b>
36
 
<br><b>&nbsp;&nbsp;&nbsp; [-lock_max_lockers <i>max</i>]</b>
37
 
<br><b>&nbsp;&nbsp;&nbsp; [-lock_max_objects <i>max</i>]</b>
38
 
<br><b>&nbsp;&nbsp;&nbsp; [-lock_timeout <i>timeout</i>]</b>
39
 
<br><b>&nbsp;&nbsp;&nbsp; [-overwrite]</b>
40
 
<br><b>&nbsp;&nbsp;&nbsp; [-txn_max <i>max</i>]</b>
41
 
<br><b>&nbsp;&nbsp;&nbsp; [-txn_timeout <i>timeout</i>]</b>
42
 
<br><b>&nbsp;&nbsp;&nbsp; [-client_timeout <i>seconds</i>]</b>
43
 
<br><b>&nbsp;&nbsp;&nbsp; [-server_timeout <i>seconds</i>]</b>
44
 
<br><b>&nbsp;&nbsp;&nbsp; [-server <i>hostname</i>]</b>
45
 
<br><b>&nbsp;&nbsp;&nbsp; [-rep_master] [-rep_client]</b>
46
 
<br><b>&nbsp;&nbsp;&nbsp; [-rep_transport <i>{ machineid sendproc }</i>]</b>
47
 
<br>&nbsp;
48
 
<p>This command opens up an environment.&nbsp;&nbsp; We automatically set
49
 
the DB_THREAD and the DB_INIT_MPOOL flags.&nbsp; The arguments are:
50
 
<ul>
51
 
<li>
52
 
<b>-cdb</b> selects the DB_INIT_CDB flag for Concurrent Data Store</li>
53
 
 
54
 
<li>
55
 
<b>-cdb_alldb</b> selects the DB_CDB_ALLDB flag for Concurrent Data Store</li>
56
 
 
57
 
<li>
58
 
<b>-lock</b> selects the DB_INIT_LOCK flag for the locking subsystem</li>
59
 
 
60
 
<li>
61
 
<b>-log</b> selects the DB_INIT_LOG flag for the logging subsystem</li>
62
 
 
63
 
<li>
64
 
<b>-txn</b> selects the DB_INIT_TXN, DB_INIT_LOCK and DB_INIT_LOG flags
65
 
for the transaction subsystem.&nbsp; If <b>nosync</b> is specified, then
66
 
it will also select DB_TXN_NOSYNC to indicate no flushes of log on commits</li>
67
 
 
68
 
<li>
69
 
<b>-create </b>selects the DB_CREATE flag to create underlying files</li>
70
 
 
71
 
<li>
72
 
<b>-home <i>directory </i></b>selects the home directory of the environment</li>
73
 
 
74
 
<li>
75
 
<b>-data_dir <i>directory </i></b>selects the data file directory of the
76
 
environment by calling <a href="../../docs/api_c/env_set_data_dir.html">DBENV->set_data_dir</a>.</li>
77
 
 
78
 
<li>
79
 
<b>-log_dir <i>directory </i></b>selects the log file directory of the
80
 
environment&nbsp; by calling <a href="../../docs/api_c/env_set_lg_dir.html">DBENV->set_lg_dir</a>.</li>
81
 
 
82
 
<li>
83
 
<b>-tmp_dir <i>directory </i></b>selects the temporary file directory of
84
 
the environment&nbsp; by calling <a href="../../docs/api_c/env_set_tmp_dir.so">DBENV->set_tmp_dir</a>.</li>
85
 
 
86
 
<li>
87
 
<b>-mode <i>mode </i></b>sets the permissions of created files to <b><i>mode</i></b></li>
88
 
 
89
 
<li>
90
 
<b>-nommap</b> selects the DB_NOMMAP flag to disallow using mmap'ed files</li>
91
 
 
92
 
<li>
93
 
<b>-private</b> selects the DB_PRIVATE flag for a private environment</li>
94
 
 
95
 
<li>
96
 
<b>-recover</b> selects the DB_RECOVER flag for recovery</li>
97
 
 
98
 
<li>
99
 
<b>-recover_fatal</b> selects the DB_RECOVER_FATAL flag for catastrophic
100
 
recovery</li>
101
 
 
102
 
<li>
103
 
<b>-system_mem</b> selects the DB_SYSTEM_MEM flag to use system memory</li>
104
 
 
105
 
<li>
106
 
<b>-errfile </b>specifies the error file to use for this environment to
107
 
<b><i>filename</i></b>
108
 
by calling <a href="../../docs/api_c/env_set_errfile.html">DBENV->set_errfile</a><b><i>.
109
 
</i></b>If
110
 
the file already exists then we will append to the end of the file</li>
111
 
 
112
 
<li>
113
 
<b>-use_environ</b> selects the DB_USE_ENVIRON flag to affect file naming</li>
114
 
 
115
 
<li>
116
 
<b>-use_environ_root</b> selects the DB_USE_ENVIRON_ROOT flag to have the
117
 
root environment affect file naming</li>
118
 
 
119
 
<li>
120
 
<b>-verbose</b> produces verbose error output for the given which subsystem,
121
 
using the <a href="../../docs/api_c/dbenv_set_verbose.html">DBENV->set_verbose</a>
122
 
method.&nbsp;&nbsp; See the description of <a href="#> <env> verbose which on|off">verbose</a>
123
 
below for valid <b><i>which </i></b>values</li>
124
 
 
125
 
<li>
126
 
<b>-region_init </b>specifies that the user wants to page fault the region
127
 
in on startup using the <a href="../../docs/api_c/env_set_region_init.html">DBENV->set_region_init</a>
128
 
method call</li>
129
 
 
130
 
<li>
131
 
<b>-cachesize </b>sets the size of the database cache to the size&nbsp;
132
 
specified by <b><i>gbytes </i></b>and <b><i>bytes, </i></b>broken up into
133
 
<b><i>ncaches</i></b>
134
 
number of caches using the <a href="../../docs/api_c/env_set_cachesize.html">DBENV->set_cachesize</a>
135
 
method</li>
136
 
 
137
 
<li>
138
 
<b>-mmapsize </b>sets the size of the database page to <b><i>size </i></b>using
139
 
the <a href="../../docs/api_c/env_set_mp_mmapsize.html">DBENV->set_mp_mmapsize</a>
140
 
method</li>
141
 
 
142
 
<li>
143
 
<b>-log_max </b>sets the maximum size of the log file to <b><i>max</i></b>
144
 
using the <a href="../../docs/api_c/env_set_lg_max.html">DBENV->set_lg_max</a>
145
 
call</li>
146
 
 
147
 
<li>
148
 
<b>-log_regionmax </b>sets the size of the log region to <b><i>max</i></b>
149
 
using the <a href="../../docs/api_c/env_set_lg_regionmax.html">DBENV->set_lg_regionmax</a>
150
 
call</li>
151
 
 
152
 
<li>
153
 
<b>-log_buffer </b>sets the size of the log file in bytes to <b><i>size</i></b>
154
 
using the <a href="../../docs/api_c/env_set_lg_bsize.html">DBENV->set_lg_bsize</a>
155
 
call</li>
156
 
 
157
 
<li>
158
 
<b>-lock_conflict </b>sets the number of lock modes to <b><i>nmodes</i></b>
159
 
and sets the locking policy for those modes to the <b><i>conflict_matrix</i></b>
160
 
given using the <a href="../../docs/api_c/env_set_lk_conflict.html">DBENV->set_lk_conflict</a>
161
 
method call</li>
162
 
 
163
 
<li>
164
 
<b>-lock_detect </b>sets the deadlock detection policy to the given policy
165
 
using the <a href="../../docs/env_set_lk_detect.html">DBENV->set_lk_detect</a>
166
 
method call.&nbsp; The policy choices are:</li>
167
 
 
168
 
<ul>
169
 
<li>
170
 
<b>default</b> selects the DB_LOCK_DEFAULT policy for default detection</li>
171
 
 
172
 
<li>
173
 
<b>oldest </b>selects DB_LOCK_OLDEST to abort the oldest locker on a deadlock</li>
174
 
 
175
 
<li>
176
 
<b>random</b> selects DB_LOCK_RANDOM to abort a random locker on a deadlock</li>
177
 
 
178
 
<li>
179
 
<b>youngest</b> selects DB_LOCK_YOUNGEST to abort the youngest locker on
180
 
a deadlock</li>
181
 
</ul>
182
 
 
183
 
<li>
184
 
<b>-lock_max </b>sets the maximum size of the lock table to <b><i>max </i></b>using
185
 
the <a href="../../docs/api_c/env_set_lk_max.html">DBENV->set_lk_max</a>
186
 
method call</li>
187
 
 
188
 
<li>
189
 
<b>-lock_max_locks </b>sets the maximum number of locks to <b><i>max </i></b>using
190
 
the <a href="../../docs/api_c/env_set_lk_max_locks.html">DBENV->set_lk_max_locks</a>
191
 
method call</li>
192
 
 
193
 
<li>
194
 
<b>-lock_max_lockers </b>sets the maximum number of locking entities to
195
 
<b><i>max
196
 
</i></b>using the <a href="../../docs/api_c/env_set_lk_max_lockers.html">DBENV->set_lk_max_lockers</a>
197
 
method call</li>
198
 
 
199
 
<li>
200
 
<b>-lock_max_objects </b>sets the maximum number of simultaneously locked
201
 
objects to <b><i>max </i></b>using the <a href="../../docs/api_c/env_set_lk_max_objects.html">DBENV->set_lk_max_objects</a>
202
 
method call</li>
203
 
 
204
 
<li>
205
 
<b>-lock_timeout </b>sets the timeout for locks in the environment</li>
206
 
 
207
 
<li>
208
 
<b>-overwrite </b>sets DB_OVERWRITE flag</li>
209
 
 
210
 
<li>
211
 
<b>-txn_max </b>sets the maximum size of the transaction table to <b><i>max</i></b>
212
 
using the <a href="../../docs/api_c/env_set_txn_max.html">DBENV->set_txn_max</a>
213
 
method call</li>
214
 
 
215
 
<li>
216
 
<b>-txn_timeout </b>sets the timeout for transactions in the environment</li>
217
 
 
218
 
<li>
219
 
<b>-client_timeout</b> sets the timeout value for the client waiting for
220
 
a reply from the server for RPC operations to <b><i>seconds</i></b>.</li>
221
 
 
222
 
<li>
223
 
<b>-server_timeout</b> sets the timeout value for the server to determine
224
 
an idle client is gone to <b><i>seconds</i></b>.</li>
225
 
 
226
 
<li>
227
 
<b>-server </b>specifies the <b><i>hostname</i></b> of the server
228
 
to connect to in the <a href="../../docs/api_c/env_set_server.html">DBENV->set_server</a>
229
 
call.</li>
230
 
 
231
 
<li>
232
 
<b>-rep_client </b>sets the newly created environment to be a
233
 
replication client, using the <a href="../../docs/api_c/rep_client.html">
234
 
DBENV->rep_client</a> call.</li>
235
 
 
236
 
<li>
237
 
<b>-rep_master </b>sets the newly created environment to be a
238
 
replication master, using the <a href="../../docs/api_c/rep_master.html">
239
 
DBENV->rep_master</a> call.</li>
240
 
 
241
 
<li>
242
 
<b>-rep_transport </b>specifies the replication transport function,
243
 
using the
244
 
<a href="../../docs/api_c/rep_transport.html">DBENV->set_rep_transport</a>
245
 
call.  This site's machine ID is set to <b><i>machineid</i></b> and
246
 
the send function, a Tcl proc, is set to <b><i>sendproc</i></b>.</li>
247
 
 
248
 
</ul>
249
 
 
250
 
This command will invoke the <a href="../../docs/api_c/env_create.html">db_env_create</a>
251
 
function.&nbsp; After it successfully gets a handle to an environment,
252
 
we bind it to a new Tcl command of the form <b><i>envX</i></b>, where X
253
 
is an integer starting at&nbsp; 0 (e.g. <b>env0, env1, </b>etc).&nbsp;
254
 
We use the <i>Tcl_CreateObjCommand()</i> to create the top level environment
255
 
command function.&nbsp; It is through this handle that the user can access
256
 
all the commands described in the <a href="#Environment Commands">Environment
257
 
Commands</a> section.&nbsp; Internally, the handle we get back from DB
258
 
will be stored as the <i>ClientData</i> portion of the new command set
259
 
so that all future environment calls will have that handle readily available.&nbsp;
260
 
Then we call the <a href="../../docs/api_c/env_open.html">DBENV->open</a>
261
 
method call and possibly some number of setup calls as described above.
262
 
<p>
263
 
<hr WIDTH="100%">
264
 
<br><a NAME="> <env> verbose which on|off"></a><b>> &lt;env> verbose <i>which</i>
265
 
on|off</b>
266
 
<p>This command controls the use of debugging output for the environment.&nbsp;
267
 
This command directly translates to a call to the <a href="../../docs/api_c/dbenv_set_verbose.html">DBENV->set_verbose</a>
268
 
method call.&nbsp; It returns either a 0 (for success), a DB error message
269
 
or it throws a Tcl error with a system message.&nbsp; The user specifies
270
 
<b><i>which</i></b>
271
 
subsystem to control, and indicates whether debug messages should be turned
272
 
<b>on</b>
273
 
or <b>off</b> for that subsystem.&nbsp; The value of <b><i>which</i></b>
274
 
must be one of the following:
275
 
<ul>
276
 
<li>
277
 
<b>chkpt</b> - Chooses the checkpointing code by using the DB_VERB_CHKPOINT
278
 
value</li>
279
 
 
280
 
<li>
281
 
<b>deadlock </b>- Chooses the deadlocking code by using the DB_VERB_DEADLOCK
282
 
value</li>
283
 
 
284
 
<li>
285
 
<b>recovery </b>- Chooses the recovery code by using the DB_VERB_RECOVERY
286
 
value</li>
287
 
 
288
 
<li>
289
 
<b>wait </b>- Chooses the waitsfor code by using the DB_VERB_WAITSFOR value</li>
290
 
</ul>
291
 
 
292
 
<hr WIDTH="100%">
293
 
<p><a NAME="> <env> close"></a><b>> &lt;env> close</b>
294
 
<p>This command closes an environment and deletes the handle.&nbsp; This
295
 
command directly translates to a call to the <a href="../../docs/api_c/env_close.html">DBENV->close</a>
296
 
method call.&nbsp; It returns either a 0 (for success), a DB error message
297
 
or it throws a Tcl error with a system message.
298
 
<p>Additionally, since the handle is no longer valid, we will call <i>Tcl_DeleteCommand()
299
 
</i>so
300
 
that further uses of the handle will be dealt with properly by Tcl itself.
301
 
<p>Also, the close command will automatically abort any <a href="txn.html">transactions</a>
302
 
and close any <a href="mpool.html">mpool</a> memory files.&nbsp; As such
303
 
we must maintain a list of open transaction and mpool handles so that we
304
 
can call <i>Tcl_DeleteCommand</i> on those as well.
305
 
<p>
306
 
<hr WIDTH="100%">
307
 
 
308
 
<b>> berkdb envremove<br>
309
 
[-data_dir <i>directory</i>]<br>
310
 
[-force]<br>
311
 
[-home <i>directory</i>]<br>
312
 
[-log_dir <i>directory</i>]<br>
313
 
[-overwrite]<br>
314
 
[-tmp_dir <i>directory</i>]<br>
315
 
[-use_environ]<br>
316
 
[-use_environ_root]</b>
317
 
 
318
 
<p>This command removes the environment if it is not in use and deletes
319
 
the handle.&nbsp; This command directly translates to a call to the <a href="../../docs/api_c/env_remove.html">DBENV->remove</a>
320
 
method call.&nbsp; It returns either a 0 (for success), a DB error message
321
 
or it throws a Tcl error with a system message.&nbsp; The arguments are:
322
 
<ul>
323
 
<li>
324
 
<b>-force</b> selects the DB_FORCE flag to remove even if other processes
325
 
have the environment open</li>
326
 
 
327
 
<li>
328
 
<b>-home <i>directory</i> </b>specifies the home directory of the environment</li>
329
 
 
330
 
<li>
331
 
<b>-data_dir <i>directory </i></b>selects the data file directory of the
332
 
environment by calling <a href="../../docs/api_c/env_set_data_dir.html">DBENV->set_data_dir</a>.</li>
333
 
 
334
 
<li>
335
 
<b>-log_dir <i>directory </i></b>selects the log file directory of the
336
 
environment&nbsp; by calling <a href="../../docs/api_c/env_set_lg_dir.html">DBENV->set_lg_dir</a>.</li>
337
 
 
338
 
<li>
339
 
<b>-overwrite </b>sets DB_OVERWRITE flag</li>
340
 
 
341
 
<li>
342
 
<b>-tmp_dir <i>directory </i></b>selects the temporary file directory of
343
 
the environment&nbsp; by calling <a href="../../docs/api_c/env_set_tmp_dir.so">DBENV->set_tmp_dir</a>.</li>
344
 
 
345
 
<li>
346
 
<b>-use_environ </b>selects the DB_USE_ENVIRON flag to affect file naming</li>
347
 
 
348
 
<li>
349
 
<b>-use_environ_root</b> selects the DB_USE_ENVIRON_ROOT flag to affect
350
 
file naming</li>
351
 
</ul>
352
 
 
353
 
</body>
354
 
</html>