Import BSDDB 4.7.25 (as of svn r89086)
This commit is contained in:
62
docs/utility/berkeley_db_svc.html
Normal file
62
docs/utility/berkeley_db_svc.html
Normal file
@@ -0,0 +1,62 @@
|
||||
<!--$Id: berkeley_db_svc.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: berkeley_db_svc</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>berkeley_db_svc</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>berkeley_db_svc [<b>-Vv</b>] [<b>-h home</b>]
|
||||
[<b>-I seconds</b>] [<b>-L file</b>] [<b>-t seconds</b>] [<b>-T seconds</b>]</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The berkeley_db_svc utility is the Berkeley DB RPC server.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-h</b><ul compact><li>Add the specified home directory to the list of allowed home directories
|
||||
that can be specified by the client. The home directory should be an
|
||||
absolute pathname. The last component of each home directory specified
|
||||
must be unique because that is how clients specify which database environment
|
||||
they want to join.
|
||||
<p>Recovery will be run on each specified environment before the server
|
||||
begins accepting requests from clients. For this reason, only one copy
|
||||
of the server program should ever be run at any time because recovery
|
||||
must always be single-threaded.</p></ul>
|
||||
<b>-I</b><ul compact><li>Set the default idle timeout for client environments to the specified
|
||||
number of seconds. The default timeout is 24 hours.</ul>
|
||||
<b>-L</b><ul compact><li>Log the execution of the berkeley_db_svc utility to the specified file in the
|
||||
following format, where <i>###</i> is the process ID, and the date
|
||||
is the time the utility was started.
|
||||
<blockquote><pre>berkeley_db_svc: ### Wed Jun 15 01:23:45 EDT 1995</pre></blockquote>
|
||||
This file will be removed if the berkeley_db_svc utility exits gracefully.</ul>
|
||||
<b>-t</b><ul compact><li>Set the default timeout for client resources (idle transactions and
|
||||
cursors) to the specified number of seconds. When the timeout expires,
|
||||
if the resource is a transaction, it is aborted; if the resource is a
|
||||
cursor, it is closed. The default timeout is 5 minutes.</ul>
|
||||
<b>-T</b><ul compact><li>Set the maximum timeout allowed for client resources. The default
|
||||
timeout is 20 minutes. If a client application requests a server
|
||||
timeout greater than the maximum timeout set for this server, the
|
||||
client's timeout will be capped at the maximum timeout value.</ul>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<b>-v</b><ul compact><li>Run in verbose mode.</ul>
|
||||
<br>
|
||||
<p>The berkeley_db_svc utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<br><b>Environment Variables</b>
|
||||
<br>
|
||||
<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable
|
||||
DB_HOME is set, it is used as the path of the database home, as described
|
||||
in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
93
docs/utility/db_archive.html
Normal file
93
docs/utility/db_archive.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!--$Id: db_archive.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: db_archive</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>db_archive</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>db_archive [<b>-adlsVv</b>] [<b>-h home</b>] [<b>-P password</b>]</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The db_archive utility writes the pathnames of log files that
|
||||
are no longer in use (for example, no longer involved in active
|
||||
transactions), to the standard output, one pathname per line. These
|
||||
log files should be written to backup media to provide for recovery in
|
||||
the case of catastrophic failure (which also requires a snapshot of the
|
||||
database files), but they may then be deleted from the system to reclaim
|
||||
disk space.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-a</b><ul compact><li>Write all pathnames as absolute pathnames, instead of relative to the
|
||||
database home directories.</ul>
|
||||
<b>-d</b><ul compact><li>Remove log files that are no longer needed; no filenames are written.
|
||||
Automatic log file removal is likely to make catastrophic recovery
|
||||
impossible.</ul>
|
||||
<b>-h</b><ul compact><li>Specify a home directory for the database environment; by
|
||||
default, the current working directory is used.</ul>
|
||||
<b>-l</b><ul compact><li>Write out the pathnames of all the database log files, whether or not
|
||||
they are involved in active transactions.</ul>
|
||||
<b>-P</b><ul compact><li>Specify an environment password. Although Berkeley DB utilities overwrite
|
||||
password strings as soon as possible, be aware there may be a window of
|
||||
vulnerability on systems where unprivileged users can see command-line
|
||||
arguments or where utilities are not able to overwrite the memory
|
||||
containing the command-line arguments.</ul>
|
||||
<b>-s</b><ul compact><li>Write the pathnames of all the database files that need to be archived
|
||||
in order to recover the database from catastrophic failure. If any of
|
||||
the database files have not been accessed during the lifetime of the
|
||||
current log files, db_archive will not include them in this
|
||||
output.
|
||||
<p>It is possible that some of the files to which the log refers have since
|
||||
been deleted from the system. In this case, db_archive will
|
||||
ignore them. When <a href="../utility/db_recover.html">db_recover</a> is run, any files to which the
|
||||
log refers that are not present during recovery are assumed to have been
|
||||
deleted and will not be recovered.</p></ul>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<b>-v</b><ul compact><li>Run in verbose mode.</ul>
|
||||
<br>
|
||||
<p>Log cursor handles (returned by the <a href="../api_c/log_cursor.html">DB_ENV->log_cursor</a> method) may have open
|
||||
file descriptors for log files in the database environment. Also, the
|
||||
Berkeley DB interfaces to the database environment logging subsystem (for
|
||||
example, <a href="../api_c/log_put.html">DB_ENV->log_put</a> and <a href="../api_c/txn_abort.html">DB_TXN->abort</a>) may allocate log cursors
|
||||
and have open file descriptors for log files as well. On operating
|
||||
systems where filesystem related system calls (for example, rename and
|
||||
unlink on Windows/NT) can fail if a process has an open file descriptor
|
||||
for the affected file, attempting to move or remove the log files listed
|
||||
by db_archive may fail. All Berkeley DB internal use of log cursors
|
||||
operates on active log files only and furthermore, is short-lived in
|
||||
nature. So, an application seeing such a failure should be restructured
|
||||
to close any open log cursors it may have, and otherwise to retry the
|
||||
operation until it succeeds. (Although the latter is not likely to be
|
||||
necessary; it is hard to imagine a reason to move or rename a log file
|
||||
in which transactions are being logged or aborted.)</p>
|
||||
<p>The db_archive utility uses a Berkeley DB environment (as described for the
|
||||
<b>-h</b> option, the environment variable <b>DB_HOME</b>, or
|
||||
because the utility was run in a directory containing a Berkeley DB
|
||||
environment). In order to avoid environment corruption when using a
|
||||
Berkeley DB environment, db_archive should always be given the chance to
|
||||
detach from the environment and exit gracefully. To cause db_archive
|
||||
to release all environment resources and exit cleanly, send it an
|
||||
interrupt signal (SIGINT).</p>
|
||||
<p>The <a href="../api_c/log_archive.html">DB_ENV->log_archive</a> method is the underlying method used by the db_archive utility.
|
||||
See the db_archive utility source code for an example of using <a href="../api_c/log_archive.html">DB_ENV->log_archive</a>
|
||||
in a IEEE/ANSI Std 1003.1 (POSIX) environment.</p>
|
||||
<p>The db_archive utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<br><b>Environment Variables</b>
|
||||
<br>
|
||||
<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable
|
||||
DB_HOME is set, it is used as the path of the database home, as described
|
||||
in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
80
docs/utility/db_checkpoint.html
Normal file
80
docs/utility/db_checkpoint.html
Normal file
@@ -0,0 +1,80 @@
|
||||
<!--$Id: db_checkpoint.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: db_checkpoint</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>db_checkpoint</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>db_checkpoint [<b>-1Vv</b>] [<b>-h home</b>]
|
||||
[<b>-k kbytes</b>] [<b>-L file</b>] [<b>-P password</b>] [<b>-p min</b>]</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The db_checkpoint utility is a daemon process that monitors the
|
||||
database log, and periodically calls <a href="../api_c/txn_checkpoint.html">DB_ENV->txn_checkpoint</a> to checkpoint
|
||||
it.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-1</b><ul compact><li>Force a single checkpoint of the log (regardless of whether or not there
|
||||
has been activity since the last checkpoint), and then exit.
|
||||
<p>
|
||||
When the <b>-1</b> flag is specified, the db_checkpoint
|
||||
utility will checkpoint the log even if unable to find an existing
|
||||
database environment. This functionality is useful when upgrading
|
||||
database environments from one version of Berkeley DB to another.</p></ul>
|
||||
<b>-h</b><ul compact><li>Specify a home directory for the database environment; by
|
||||
default, the current working directory is used.</ul>
|
||||
<b>-k</b><ul compact><li>Checkpoint the database at least as often as every <b>kbytes</b> of log
|
||||
file are written.</ul>
|
||||
<b>-L</b><ul compact><li>Log the execution of the db_checkpoint utility to the specified file in the
|
||||
following format, where <i>###</i> is the process ID, and the date
|
||||
is the time the utility was started.
|
||||
<blockquote><pre>db_checkpoint: ### Wed Jun 15 01:23:45 EDT 1995</pre></blockquote>
|
||||
This file will be removed if the db_checkpoint utility exits gracefully.</ul>
|
||||
<b>-P</b><ul compact><li>Specify an environment password. Although Berkeley DB utilities overwrite
|
||||
password strings as soon as possible, be aware there may be a window of
|
||||
vulnerability on systems where unprivileged users can see command-line
|
||||
arguments or where utilities are not able to overwrite the memory
|
||||
containing the command-line arguments.</ul>
|
||||
<b>-p</b><ul compact><li>Checkpoint the database at least every <b>min</b> minutes if there has
|
||||
been any activity since the last checkpoint.</ul>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<b>-v</b><ul compact><li>Write the time of each checkpoint attempt to the standard output.</ul>
|
||||
<br>
|
||||
<p>At least one of the <b>-1</b>, <b>-k</b>, and <b>-p</b> options
|
||||
must be specified.</p>
|
||||
<p>The db_checkpoint utility uses a Berkeley DB environment (as described for the
|
||||
<b>-h</b> option, the environment variable <b>DB_HOME</b>, or
|
||||
because the utility was run in a directory containing a Berkeley DB
|
||||
environment). In order to avoid environment corruption when using a
|
||||
Berkeley DB environment, db_checkpoint should always be given the chance to
|
||||
detach from the environment and exit gracefully. To cause db_checkpoint
|
||||
to release all environment resources and exit cleanly, send it an
|
||||
interrupt signal (SIGINT).</p>
|
||||
<p>The db_checkpoint utility does not attempt to create the Berkeley DB
|
||||
shared memory regions if they do not already exist. The application
|
||||
that creates the region should be started first, and once the region is
|
||||
created, the db_checkpoint utility should be started.</p>
|
||||
<p>The <a href="../api_c/txn_checkpoint.html">DB_ENV->txn_checkpoint</a> method is the underlying method used by the db_checkpoint utility.
|
||||
See the db_checkpoint utility source code for an example of using <a href="../api_c/txn_checkpoint.html">DB_ENV->txn_checkpoint</a>
|
||||
in a IEEE/ANSI Std 1003.1 (POSIX) environment.</p>
|
||||
<p>The db_checkpoint utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<br><b>Environment Variables</b>
|
||||
<br>
|
||||
<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable
|
||||
DB_HOME is set, it is used as the path of the database home, as described
|
||||
in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
189
docs/utility/db_codegen.html
Normal file
189
docs/utility/db_codegen.html
Normal file
@@ -0,0 +1,189 @@
|
||||
<!--$Id: db_codegen.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: db_codegen</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>db_codegen</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>db_codegen [<b>-Vv</b>] [<b>-a c</b>] [<b>-i file</b>] [<b>-o file</b>]</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The db_codegen utility generates application code to create and
|
||||
configure Berkeley DB database environments and databases based on a simple
|
||||
description language, and writes it to one or more output files. The
|
||||
generated code may need modification, in the case of complicated
|
||||
applications, but will usually significantly reduce the time required
|
||||
to create Berkeley DB applications.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-a</b><ul compact><li>Generate code for the specified API (currently, only "c" is accepted).</ul>
|
||||
<b>-i</b><ul compact><li>Specify an input file; by default, stdin is used.</ul>
|
||||
<b>-o</b><ul compact><li>Specify an output file prefix; by default, "application" is used.</ul>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<b>-v</b><ul compact><li>Run in verbose mode.</ul>
|
||||
<br>
|
||||
<p>The db_codegen utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<b>C Language Specific Information</b>
|
||||
<p>By default, when the db_codegen utility generates C-language
|
||||
code, the output file is named "application.c". The output filename
|
||||
can be specified with <b>-o</b> option.</p>
|
||||
<p>At the beginning of the output file is a list of public database
|
||||
environment (<a href="../api_c/env_class.html">DB_ENV</a>) handles and database (<a href="../api_c/db_class.html">DB</a>) handles,
|
||||
as specified by the description language. The database environment
|
||||
handle variables are named "XXX_dbenv", where "XXX" is the name of the
|
||||
environment in the input specification. For databases associated with
|
||||
a database environment, the database handle variables are named
|
||||
"XXX_YYY", where "XXX" is the name of the environment, and "YYY" is the
|
||||
name of the database. For standalone databases, the database handle
|
||||
variables are named "XXX", where "XXX" is the name of the database.</p>
|
||||
<p>There are two public functions in the output file: bdb_startup and
|
||||
bdb_shutdown. The bdb_startup function should be called to create and
|
||||
configure the database environments and databases, and the bdb_shutdown
|
||||
function should be called to gracefully shut down the environments and
|
||||
databases.</p>
|
||||
<b>Specification Language</b>
|
||||
<p>The db_codegen uses a simple description language:</p>
|
||||
<p><ul type=disc>
|
||||
<li>Lines in the input consist of white-space separated tokens.
|
||||
<li>Tokens are case-insensitive.
|
||||
<li>Empty lines, and lines where the first non-space character
|
||||
is hash mark ("#"). are ignored. In addition, hash marks may appear
|
||||
in lines, in which case the content of the line from the hash mark to
|
||||
the end of the line is ignored.
|
||||
</ul>
|
||||
<p>There are two top-level objects: "environment" and "database", which
|
||||
correspond to database environments and databases, respectively. These
|
||||
top-level objects can be associated with keywords to describe their
|
||||
configuration and relationships.</p>
|
||||
<p>For example, the following input would create two standalone databases:</p>
|
||||
<blockquote><pre>database data_one {
|
||||
type btree
|
||||
}
|
||||
database data_two {
|
||||
type btree
|
||||
}</pre></blockquote>
|
||||
<p>In this case, there would be no <a href="../api_c/env_class.html">DB_ENV</a> handle, and the public
|
||||
<a href="../api_c/db_class.html">DB</a> handles would be:</p>
|
||||
<blockquote><pre>DB *data_one;
|
||||
DB *data_two;</pre></blockquote>
|
||||
<p>For example, the following input would create a database environment
|
||||
which contains three databases:</p>
|
||||
<blockquote><pre>environment myenv {
|
||||
database data_one {
|
||||
type btree
|
||||
}
|
||||
database data_two {
|
||||
type btree
|
||||
}
|
||||
database data_three {
|
||||
type btree
|
||||
}
|
||||
}</pre></blockquote>
|
||||
<p>In this case, the public <a href="../api_c/env_class.html">DB_ENV</a> and <a href="../api_c/db_class.html">DB</a> handles would be:</p>
|
||||
<blockquote><pre>DB_ENV *myenv_dbenv;
|
||||
DB *myenv_data_one;
|
||||
DB *myenv_data_two;
|
||||
DB *myenv_data_three;</pre></blockquote>
|
||||
<p>A variety of keywords can be specified for the databases and the
|
||||
environments. For example, the cache size can be specified for
|
||||
the database environment, and the page size can be specified for
|
||||
the database, as well as secondary relationships:</p>
|
||||
<blockquote><pre>environment myenv {
|
||||
cachesize 2 0 10
|
||||
database data_one {
|
||||
type btree
|
||||
pagesize 1024
|
||||
}
|
||||
database data_two {
|
||||
primary data_one
|
||||
secondary_offset 10 15
|
||||
type btree
|
||||
pagesize 32768
|
||||
}
|
||||
database data_three {
|
||||
type btree
|
||||
pagesize 512
|
||||
}
|
||||
}</pre></blockquote>
|
||||
<b>Environment Keywords</b>
|
||||
<br>
|
||||
<b>environment</b><ul compact><li>Start a database environment block.
|
||||
<p>There must be three tokens on the line: the keyword, the name of the
|
||||
environment and an opening brace ("{").</p></ul>
|
||||
<b>home</b><ul compact><li>Specify the database environment home directory.
|
||||
<p>There must be two tokens on the line: the keyword, and the home
|
||||
directory.</p></ul>
|
||||
<b>cachesize</b><ul compact><li>Specify the database environment cache size.
|
||||
<p>There must be two tokens on the line: the keyword, the gigabytes of
|
||||
cache, the bytes of cache, and the number of caches (the number of
|
||||
underlying physical areas into which the cache is logically
|
||||
divided).</p></ul>
|
||||
<b>private</b><ul compact><li>Specify the database environment is private.
|
||||
<p>There must be one token on the line: the keyword by itself.</p></ul>
|
||||
<b>}</b><ul compact><li>End the database environment block.
|
||||
<p>There must be one token on the line: the keyword by itself.</p></ul>
|
||||
<br>
|
||||
<b>Database Keywords</b>
|
||||
<br>
|
||||
<b>database</b><ul compact><li>Start a database block.
|
||||
<p>There must be three tokens on the line: the keyword, the name of the
|
||||
database and an opening brace ("{").</p></ul>
|
||||
<b>custom</b><ul compact><li>Specify a custom key-comparison routine. This is used when the Btree
|
||||
database requires a specific sort that db_codegen cannot
|
||||
generate. A stub key comparison routine will be created and configured
|
||||
for the database which should be modified as necessary. See the
|
||||
"key_type" keyword for more information.
|
||||
<p>There must be one token on the line: the keyword by itself.</p></ul>
|
||||
<b>dupsort</b><ul compact><li>Configure the database to support sorted duplicates.
|
||||
<p>There must be one token on the line: the keyword by itself.</p></ul>
|
||||
<b>extentsize</b><ul compact><li>Configure the size of the Queue database extent files.
|
||||
<p>There must be two tokens on the line: the keyword, and the extent file size,
|
||||
as a number of pages.</p></ul>
|
||||
<b>key_type</b><ul compact><li>Configure a integral type key-comparison routine. This is used when the
|
||||
Btree database Btree database key is an integral type (such as "unsigned
|
||||
int", or "u_int32_t"). Any C-language integral type may be specified.
|
||||
See the "custom" keyword for more information. A Btree comparison routine
|
||||
based on the type of the key will be created and configured.
|
||||
<p>There must be two tokens on the line: the keyword, and the type.</p></ul>
|
||||
<b>pagesize</b><ul compact><li>Configure the database page size.
|
||||
<p>There must be two tokens on the line: the keyword, and the page size
|
||||
in bytes.</p></ul>
|
||||
<b>primary</b><ul compact><li>Configure the database as a secondary index. A stub secondary callback
|
||||
routine will be created and configured for the database, which should
|
||||
be modified as necessary. See the "secondary_offset" keyword for more
|
||||
information.
|
||||
<p>name of the primary database for which this database is a secondary.</p></ul>
|
||||
<b>recnum</b><ul compact><li>Configure the Btree database to support record number access.
|
||||
<p>There must be one token on the line: the keyword by itself.</p></ul>
|
||||
<b>re_len</b><ul compact><li>Configure the record length for a Queue database or a fixed-length Recno
|
||||
database.
|
||||
<p>There must be two tokens on the line: the keyword, and the length of
|
||||
a record, in bytes.</p></ul>
|
||||
<b>secondary_offset</b><ul compact><li>Configure a secondary callback routine based on a byte string found in
|
||||
the primary database's data item.
|
||||
<p>There must be three tokens on the line: the keyword, the byte offset
|
||||
from the beginning of the primary data item where the secondary key
|
||||
occurs, and the length of the secondary key in bytes.</p></ul>
|
||||
<b>transaction</b><ul compact><li>Configure the database (and, by extension, the database environment),
|
||||
to be transactional.
|
||||
<p>There must be one token on the line: the keyword by itself.</p></ul>
|
||||
<b>type</b><ul compact><li>Configure the database type.
|
||||
<p>There must be two tokens on the line: the keyword, and the type, where
|
||||
the type is one of "btree", "hash", "queue" or "recno".</p></ul>
|
||||
<b>}</b><ul compact><li>End the database environment block.
|
||||
<p>There must be one token on the line: the keyword by itself.</p></ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
86
docs/utility/db_deadlock.html
Normal file
86
docs/utility/db_deadlock.html
Normal file
@@ -0,0 +1,86 @@
|
||||
<!--$Id: db_deadlock.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: db_deadlock</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>db_deadlock</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>db_deadlock [<b>-Vv</b>]
|
||||
[<b>-a e | m | n | o | W | w | y</b>] [<b>-h home</b>] [<b>-L file</b>] [<b>-t sec.usec</b>]</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The db_deadlock utility traverses the database environment lock
|
||||
region, and aborts a lock request each time it detects a deadlock or a
|
||||
lock request that has timed out. By default, in the case of a deadlock,
|
||||
a random lock request is chosen to be aborted.</p>
|
||||
<p>This utility should be run as a background daemon, or the underlying
|
||||
Berkeley DB deadlock detection interfaces should be called in some other way,
|
||||
whenever there are multiple threads or processes accessing a database
|
||||
and at least one of them is modifying it.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-a</b><ul compact><li>When a deadlock is detected, abort the locker:
|
||||
<br>
|
||||
<b>m</b><ul compact><li>with the most locks</ul>
|
||||
<b>n</b><ul compact><li>with the fewest locks</ul>
|
||||
<b>o</b><ul compact><li>with the oldest lock</ul>
|
||||
<b>W</b><ul compact><li>with the most write locks</ul>
|
||||
<b>w</b><ul compact><li>with the fewest write locks</ul>
|
||||
<b>y</b><ul compact><li>with the youngest lock</ul>
|
||||
<br></ul>
|
||||
<p>When lock or transaction timeouts have been specified:
|
||||
<br>
|
||||
<b>e</b><ul compact><li>abort any lock request that has timed out</ul>
|
||||
<br></p>
|
||||
<b>-h</b><ul compact><li>Specify a home directory for the database environment; by
|
||||
default, the current working directory is used.</ul>
|
||||
<b>-L</b><ul compact><li>Log the execution of the db_deadlock utility to the specified file in the
|
||||
following format, where <i>###</i> is the process ID, and the date
|
||||
is the time the utility was started.
|
||||
<blockquote><pre>db_deadlock: ### Wed Jun 15 01:23:45 EDT 1995</pre></blockquote>
|
||||
This file will be removed if the db_deadlock utility exits gracefully.</ul>
|
||||
<b>-t</b><ul compact><li>Check the database environment every <b>sec</b> seconds plus
|
||||
<b>usec</b> microseconds to see if a process has been forced to wait
|
||||
for a lock; if one has, review the database environment lock
|
||||
structures.</ul>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<b>-v</b><ul compact><li>Run in verbose mode, generating messages each time the detector runs.</ul>
|
||||
<br>
|
||||
<p>If the <b>-t</b> option is not specified, db_deadlock will
|
||||
run once and exit.</p>
|
||||
<p>The db_deadlock utility uses a Berkeley DB environment (as described for the
|
||||
<b>-h</b> option, the environment variable <b>DB_HOME</b>, or
|
||||
because the utility was run in a directory containing a Berkeley DB
|
||||
environment). In order to avoid environment corruption when using a
|
||||
Berkeley DB environment, db_deadlock should always be given the chance to
|
||||
detach from the environment and exit gracefully. To cause db_deadlock
|
||||
to release all environment resources and exit cleanly, send it an
|
||||
interrupt signal (SIGINT).</p>
|
||||
<p>The db_deadlock utility does not attempt to create the Berkeley DB
|
||||
shared memory regions if they do not already exist. The application
|
||||
which creates the region should be started first, and then, once the
|
||||
region is created, the db_deadlock utility should be started.</p>
|
||||
<p>The <a href="../api_c/lock_detect.html">DB_ENV->lock_detect</a> method is the underlying method used by the db_deadlock utility.
|
||||
See the db_deadlock utility source code for an example of using <a href="../api_c/lock_detect.html">DB_ENV->lock_detect</a>
|
||||
in a IEEE/ANSI Std 1003.1 (POSIX) environment.</p>
|
||||
<p>The db_deadlock utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<br><b>Environment Variables</b>
|
||||
<br>
|
||||
<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable
|
||||
DB_HOME is set, it is used as the path of the database home, as described
|
||||
in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
120
docs/utility/db_dump.html
Normal file
120
docs/utility/db_dump.html
Normal file
@@ -0,0 +1,120 @@
|
||||
<!--$Id: db_dump.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: db_dump</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>db_dump</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>db_dump [<b>-klNpRrV</b>] [<b>-d ahr</b>]
|
||||
[<b>-f output</b>] [<b>-h home</b>] [<b>-P password</b>] [<b>-s database</b>] file
|
||||
db_dump185 [<b>-p</b>] [<b>-f output</b>] file</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The db_dump utility reads the database file <b>file</b> and
|
||||
writes it to the standard output using a portable flat-text format
|
||||
understood by the <a href="../utility/db_load.html">db_load</a> utility. The <b>file</b> argument
|
||||
must be a file produced using the Berkeley DB library functions.</p>
|
||||
<p>The <a href="../utility/db_dump.html">db_dump185</a> utility is similar to the db_dump utility,
|
||||
except that it reads databases in the format used by Berkeley DB versions 1.85
|
||||
and 1.86.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-d</b><ul compact><li>Dump the specified database in a format helpful for debugging the Berkeley DB
|
||||
library routines.
|
||||
<br>
|
||||
<b>a</b><ul compact><li>Display all information.</ul>
|
||||
<b>h</b><ul compact><li>Display only page headers.</ul>
|
||||
<b>r</b><ul compact><li>Do not display the free-list or pages on the free list. This
|
||||
mode is used by the recovery tests.</ul>
|
||||
<br>
|
||||
<p><b>The output format of the <b>-d</b> option is not standard and may change,
|
||||
without notice, between releases of the Berkeley DB library.</b></p></ul>
|
||||
<b>-f</b><ul compact><li>Write to the specified <b>file</b> instead of to the standard output.</ul>
|
||||
<b>-h</b><ul compact><li>Specify a home directory for the database environment; by
|
||||
default, the current working directory is used.</ul>
|
||||
<b>-k</b><ul compact><li>Dump record numbers from Queue and Recno databases as keys.</ul>
|
||||
<b>-l</b><ul compact><li>List the databases stored in the file.</ul>
|
||||
<b>-N</b><ul compact><li>Do not acquire shared region mutexes while running. Other problems,
|
||||
such as potentially fatal errors in Berkeley DB, will be ignored as well.
|
||||
This option is intended only for debugging errors, and should not be
|
||||
used under any other circumstances.</ul>
|
||||
<b>-P</b><ul compact><li>Specify an environment password. Although Berkeley DB utilities overwrite
|
||||
password strings as soon as possible, be aware there may be a window of
|
||||
vulnerability on systems where unprivileged users can see command-line
|
||||
arguments or where utilities are not able to overwrite the memory
|
||||
containing the command-line arguments.</ul>
|
||||
<b>-p</b><ul compact><li>If characters in either the key or data items are printing characters (as
|
||||
defined by <b>isprint</b>(3)), use printing characters in <b>file</b>
|
||||
to represent them. This option permits users to use standard text editors
|
||||
and tools to modify the contents of databases.
|
||||
<p>Note: different systems may have different notions about what characters
|
||||
are considered <i>printing characters</i>, and databases dumped in
|
||||
this manner may be less portable to external systems.</p></ul>
|
||||
<b>-R</b><ul compact><li>Aggressively salvage data from a possibly corrupt file. The <b>-R</b>
|
||||
flag differs from the <b>-r</b> option in that it will return all
|
||||
possible data from the file at the risk of also returning already deleted
|
||||
or otherwise nonsensical items. Data dumped in this fashion will almost
|
||||
certainly have to be edited by hand or other means before the data is
|
||||
ready for reload into another database</ul>
|
||||
<b>-r</b><ul compact><li>Salvage data from a possibly corrupt file. When used on a uncorrupted
|
||||
database, this option should return equivalent data to a normal dump, but
|
||||
most likely in a different order.</ul>
|
||||
<b>-s</b><ul compact><li>Specify a single database to dump. If no database is specified, all
|
||||
databases in the database file are dumped.</ul>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<br>
|
||||
<p>Dumping and reloading Hash databases that use user-defined hash
|
||||
functions will result in new databases that use the default hash
|
||||
function. Although using the default hash function may not be optimal
|
||||
for the new database, it will continue to work correctly.</p>
|
||||
<p>Dumping and reloading Btree databases that use user-defined prefix or
|
||||
comparison functions will result in new databases that use the default
|
||||
prefix and comparison functions.
|
||||
<b>In this case, it is quite likely that the database will be damaged
|
||||
beyond repair permitting neither record storage or retrieval.</b></p>
|
||||
<p>The only available workaround for either case is to modify the sources
|
||||
for the <a href="../utility/db_load.html">db_load</a> utility to load the database using the correct
|
||||
hash, prefix, and comparison functions.</p>
|
||||
<p>The <a href="../utility/db_dump.html">db_dump185</a> utility may not be available on your system
|
||||
because it is not always built when the Berkeley DB libraries and utilities
|
||||
are installed. If you are unable to find it, see your system
|
||||
administrator for further information.</p>
|
||||
<p>The db_dump and <a href="../utility/db_dump.html">db_dump185</a> utility output formats are
|
||||
documented in the <a href="../ref/dumpload/format.html">Dump Output
|
||||
Formats</a> section of the Berkeley DB Reference Guide.</p>
|
||||
<p>The db_dump utility may be used with a Berkeley DB environment (as described for the
|
||||
<b>-h</b> option, the environment variable <b>DB_HOME</b>, or
|
||||
because the utility was run in a directory containing a Berkeley DB
|
||||
environment). In order to avoid environment corruption when using a
|
||||
Berkeley DB environment, db_dump should always be given the chance to
|
||||
detach from the environment and exit gracefully. To cause db_dump
|
||||
to release all environment resources and exit cleanly, send it an
|
||||
interrupt signal (SIGINT).</p>
|
||||
<p>Even when using a Berkeley DB database environment, the db_dump
|
||||
utility does not use any kind of database locking if it is invoked with
|
||||
the <b>-d</b>, <b>-R</b>, or <b>-r</b> arguments. If used with
|
||||
one of these arguments, the db_dump utility may only be safely
|
||||
run on databases that are not being modified by any other process;
|
||||
otherwise, the output may be corrupt.</p>
|
||||
<p>The db_dump utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<p>The <a href="../utility/db_dump.html">db_dump185</a> utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<br><b>Environment Variables</b>
|
||||
<br>
|
||||
<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable
|
||||
DB_HOME is set, it is used as the path of the database home, as described
|
||||
in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
126
docs/utility/db_hotbackup.html
Normal file
126
docs/utility/db_hotbackup.html
Normal file
@@ -0,0 +1,126 @@
|
||||
<!--$Id: db_hotbackup.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: db_hotbackup</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>db_hotbackup</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>db_hotbackup [<b>-cDuVv</b>] [<b>-d data_dir ...</b>] [<b>-h home</b>] [<b>-l log_dir</b>] [<b>-P password</b>] <b>-b</b> backup_dir</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The db_hotbackup utility creates "hot backup" or "hot failover"
|
||||
snapshots of Berkeley DB database environments.</p>
|
||||
<p>The db_hotbackup utility performs the following steps:</p>
|
||||
<ol>
|
||||
<p><li>If the <b>-c</b> option is specified, checkpoint the source home
|
||||
database environment, and remove any unnecessary log files.
|
||||
<p><li>If the target directory for the backup does not exist, it is created
|
||||
with mode read-write-execute for the owner.
|
||||
<p>If the target directory for the backup does exist and the <b>-u</b>
|
||||
option was specified, all log files in the target directory are removed;
|
||||
if the <b>-u</b> option was not specified, all files in the target
|
||||
directory are removed.</p>
|
||||
<p><li>If the <b>-u</b> option was not specified, copy application-specific
|
||||
files found in the database environment home directory, and any
|
||||
directories specified using the <b>-d</b> option, into the target
|
||||
directory for the backup.
|
||||
<p><li>Copy all log files found in the directory specified by the <b>-l</b>
|
||||
option (or in the database environment home directory, if no <b>-l</b>
|
||||
option was specified), into the target directory for the backup.
|
||||
<p><li>Perform catastrophic recovery in the target directory for the backup.
|
||||
<p><li>Remove any unnecessary log files from the target directory for the
|
||||
backup.
|
||||
</ol>
|
||||
<p>The db_hotbackup utility does not resolve pending transactions that
|
||||
are in the prepared state. Applications that use <a href="../api_c/txn_prepare.html">DB_TXN->prepare</a>
|
||||
should specify <a href="../api_c/env_open.html#DB_RECOVER_FATAL">DB_RECOVER_FATAL</a> when opening the environment,
|
||||
and run <a href="../api_c/txn_recover.html">DB_ENV->txn_recover</a> to resolve any pending transactions, when
|
||||
failing over to the backup.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-b</b><ul compact><li>Specify the target directory for the backup.</ul>
|
||||
<b>-c</b><ul compact><li>Before performing the backup, checkpoint the source database environment
|
||||
and remove any log files that are no longer required in that environment.
|
||||
<b>To avoid making catastrophic recovery impossible, log file
|
||||
removal must be integrated with log file archival.</b></ul>
|
||||
<b>-D</b><ul compact><li>Use the data and log directories listed in a <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration
|
||||
file in the source directory. This option has four effects:
|
||||
<p><ul type=disc>
|
||||
<li>The specified data and log directories will be created relative to the
|
||||
target directory, with mode read-write-execute owner, if they do not
|
||||
already exist.
|
||||
<li>In step #3 above, all files in any source data directories specified in
|
||||
the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file will be copied to the target data directories.
|
||||
<li>In step #4 above, log files will be copied from any log directory specified
|
||||
in the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file, instead of from the default locations.
|
||||
<li>The <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration file will be copied from the source
|
||||
directory to the target directory, and subsequently used for configuration
|
||||
if recovery is run in the target directory.
|
||||
</ul>
|
||||
<p>Care should be taken with the <b>-D</b> option where data and log
|
||||
directories are named relative to the source directory but are not
|
||||
subdirectories (that is, the name includes the element "..")
|
||||
Specifically, the constructed target directory names must be meaningful
|
||||
and distinct from the source directory names, otherwise running recovery
|
||||
in the target directory might corrupt the source data files.</p>
|
||||
<p><b>It is an error to use absolute pathnames for data or log directories in
|
||||
this mode, as the <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration file copied into the
|
||||
target directory would then point at the source directories and running
|
||||
recovery would corrupt the source data files.</b></p></ul>
|
||||
<b>-d</b><ul compact><li>Specify one or more directories that contain data files to be copied to
|
||||
the target directory.
|
||||
<p><b>As all database files are copied into a single target directory, files
|
||||
named the same, stored in different source directories, would overwrite
|
||||
each other when copied to the target directory.</b></p>
|
||||
<p>Please note the database environment recovery log references database
|
||||
files as they are named by the application program. <b>If the
|
||||
application uses absolute or relative pathnames to name database files,
|
||||
(rather than filenames and the <a href="../api_c/env_set_data_dir.html">DB_ENV->set_data_dir</a> method or the
|
||||
<a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> configuration file to specify filenames), running
|
||||
recovery in the target directory may not properly find the copies of
|
||||
the files or might even find the source files, potentially resulting in
|
||||
corruption.</b></p></ul>
|
||||
<b>-h</b><ul compact><li>Specify the target directory for the backup, that is, the database
|
||||
environment home directory.</ul>
|
||||
<b>-l</b><ul compact><li>Specify a source directory that contains log files; if none is specified,
|
||||
the database environment home directory will be searched for log files.</ul>
|
||||
<b>-P</b><ul compact><li>Specify an environment password. Although Berkeley DB utilities overwrite
|
||||
password strings as soon as possible, be aware there may be a window of
|
||||
vulnerability on systems where unprivileged users can see command-line
|
||||
arguments or where utilities are not able to overwrite the memory
|
||||
containing the command-line arguments.</ul>
|
||||
<b>-u</b><ul compact><li>Update a pre-existing hot backup snapshot by copying in new log files.
|
||||
If the <b>-u</b> option is specified, no databases will be copied
|
||||
into the target directory.</ul>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<b>-v</b><ul compact><li>Run in verbose mode, listing operations as they are done.</ul>
|
||||
<br>
|
||||
<p>The db_hotbackup utility uses a Berkeley DB environment (as described for the
|
||||
<b>-h</b> option, the environment variable <b>DB_HOME</b>, or
|
||||
because the utility was run in a directory containing a Berkeley DB
|
||||
environment). In order to avoid environment corruption when using a
|
||||
Berkeley DB environment, db_hotbackup should always be given the chance to
|
||||
detach from the environment and exit gracefully. To cause db_hotbackup
|
||||
to release all environment resources and exit cleanly, send it an
|
||||
interrupt signal (SIGINT).</p>
|
||||
<p>The db_hotbackup utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<br><b>Environment Variables</b>
|
||||
<br>
|
||||
<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable
|
||||
DB_HOME is set, it is used as the path of the database home, as described
|
||||
in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
161
docs/utility/db_load.html
Normal file
161
docs/utility/db_load.html
Normal file
@@ -0,0 +1,161 @@
|
||||
<!--$Id: db_load.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: db_load</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>db_load</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>db_load [<b>-nTV</b>] [<b>-c name=value</b>] [<b>-f file</b>]
|
||||
[<b>-h home</b>] [<b>-P password</b>] [<b>-t btree | hash | queue | recno</b>] file
|
||||
db_load [<b>-r lsn | fileid</b>] [<b>-h home</b>] [<b>-P password</b>] file</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The db_load utility reads from the standard input and loads it
|
||||
into the database <b>file</b>. The database <b>file</b> is created if
|
||||
it does not already exist.</p>
|
||||
<p>The input to db_load must be in the output format specified by the
|
||||
<a href="../utility/db_dump.html">db_dump</a> utility, utilities, or as specified for the <b>-T</b>
|
||||
below.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-c</b><ul compact><li>Specify configuration options ignoring any value they may have based on
|
||||
the input. The command-line format is <b>name=value</b>. See the
|
||||
Supported Keywords section below for a list of keywords supported by
|
||||
the <b>-c</b> option.</ul>
|
||||
<b>-f</b><ul compact><li>Read from the specified <b>input</b> file instead of from the standard
|
||||
input.</ul>
|
||||
<b>-h</b><ul compact><li>Specify a home directory for the database environment.
|
||||
<p>If a home directory is specified, the database environment is opened
|
||||
using the <a href="../api_c/env_open.html#DB_INIT_LOCK">DB_INIT_LOCK</a>, <a href="../api_c/env_open.html#DB_INIT_LOG">DB_INIT_LOG</a>,
|
||||
<a href="../api_c/env_open.html#DB_INIT_MPOOL">DB_INIT_MPOOL</a>, <a href="../api_c/env_open.html#DB_INIT_TXN">DB_INIT_TXN</a>, and <a href="../api_c/env_open.html#DB_USE_ENVIRON">DB_USE_ENVIRON</a>
|
||||
flags to <a href="../api_c/env_open.html">DB_ENV->open</a>. (This means that db_load can be
|
||||
used to load data into databases while they are in use by other
|
||||
processes.) If the <a href="../api_c/env_open.html">DB_ENV->open</a> call fails, or if no home
|
||||
directory is specified, the database is still updated, but the
|
||||
environment is ignored; for example, no locking is done.</p></ul>
|
||||
<b>-n</b><ul compact><li>Do not overwrite existing keys in the database when loading into an
|
||||
already existing database. If a key/data pair cannot be loaded into the
|
||||
database for this reason, a warning message is displayed on the standard
|
||||
error output, and the key/data pair are skipped.</ul>
|
||||
<b>-P</b><ul compact><li>Specify an environment password. Although Berkeley DB utilities overwrite
|
||||
password strings as soon as possible, be aware there may be a window of
|
||||
vulnerability on systems where unprivileged users can see command-line
|
||||
arguments or where utilities are not able to overwrite the memory
|
||||
containing the command-line arguments.</ul>
|
||||
<b>-r</b><ul compact><li>Reset the database's file ID or log sequence numbers (LSNs).
|
||||
<p>All database pages in transactional environments contain references to
|
||||
the environment's log records. In order to copy a database into a
|
||||
different database environment, database page references to the old
|
||||
environment's log records must be reset, otherwise data corruption can
|
||||
occur when the database is modified in the new environment. The
|
||||
<b>-r</b> <b>lsn</b> option resets a database's log sequence
|
||||
numbers.</p>
|
||||
<p>All databases contain an ID string used to identify the database in the
|
||||
database environment cache. If a database is copied, and used in the
|
||||
same environment as another file with the same ID string, corruption can
|
||||
occur. The <b>-r</b> <b>fileid</b> option resets a database's file
|
||||
ID to a new value.</p>
|
||||
<p><b>In both cases, the physical file specified by the <b>file</b> argument
|
||||
is modified in-place.</b></p></ul>
|
||||
<b>-T</b><ul compact><li>The <b>-T</b> option allows non-Berkeley DB applications to easily load text
|
||||
files into databases.
|
||||
<p>If the database to be created is of type Btree or Hash, or the keyword
|
||||
<b>keys</b> is specified as set, the input must be paired lines of text,
|
||||
where the first line of the pair is the key item, and the second line of
|
||||
the pair is its corresponding data item. If the database to be created
|
||||
is of type Queue or Recno and the keywork <b>keys</b> is not set, the
|
||||
input must be lines of text, where each line is a new data item for the
|
||||
database.</p>
|
||||
<p>A simple escape mechanism, where newline and backslash (\)
|
||||
characters are special, is applied to the text input. Newline characters
|
||||
are interpreted as record separators. Backslash characters in the text
|
||||
will be interpreted in one of two ways: If the backslash character
|
||||
precedes another backslash character, the pair will be interpreted as a
|
||||
literal backslash. If the backslash character precedes any other
|
||||
character, the two characters following the backslash will be interpreted
|
||||
as a hexadecimal specification of a single character; for example,
|
||||
\0a is a newline character in the ASCII character set.</p>
|
||||
<p>For this reason, any backslash or newline characters that naturally
|
||||
occur in the text input must be escaped to avoid misinterpretation by
|
||||
db_load.</p>
|
||||
<p>If the <b>-T</b> option is specified, the underlying access method type
|
||||
must be specified using the <b>-t</b> option.</p></ul>
|
||||
<b>-t</b><ul compact><li>Specify the underlying access method. If no <b>-t</b> option is
|
||||
specified, the database will be loaded into a database of the same type
|
||||
as was dumped; for example, a Hash database will be created if a Hash
|
||||
database was dumped.
|
||||
<p>Btree and Hash databases may be converted from one to the other. Queue
|
||||
and Recno databases may be converted from one to the other. If the
|
||||
<b>-k</b> option was specified on the call to <a href="../utility/db_dump.html">db_dump</a> then Queue
|
||||
and Recno databases may be converted to Btree or Hash, with the key being
|
||||
the integer record number.</p></ul>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<br>
|
||||
<p>The db_load utility may be used with a Berkeley DB environment (as described for the
|
||||
<b>-h</b> option, the environment variable <b>DB_HOME</b>, or
|
||||
because the utility was run in a directory containing a Berkeley DB
|
||||
environment). In order to avoid environment corruption when using a
|
||||
Berkeley DB environment, db_load should always be given the chance to
|
||||
detach from the environment and exit gracefully. To cause db_load
|
||||
to release all environment resources and exit cleanly, send it an
|
||||
interrupt signal (SIGINT).</p>
|
||||
<p>The db_load utility exits 0 on success, 1 if one or more key/data
|
||||
pairs were not loaded into the database because the key already existed,
|
||||
and >1 if an error occurs.</p>
|
||||
<b>Examples</b>
|
||||
<p>The db_load utility can be used to load text files into databases.
|
||||
For example, the following command loads the standard UNIX
|
||||
<i>/etc/passwd</i> file into a database, with the login name as the
|
||||
key item and the entire password entry as the data item:</p>
|
||||
<blockquote><pre>awk -F: '{print $1; print $0}' < /etc/passwd |
|
||||
sed 's/\\/\\\\/g' | db_load -T -t hash passwd.db</pre></blockquote>
|
||||
<p>Note that backslash characters naturally occurring in the text are escaped
|
||||
to avoid interpretation as escape characters by db_load.</p>
|
||||
<br><b>Environment Variables</b>
|
||||
<br>
|
||||
<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable
|
||||
DB_HOME is set, it is used as the path of the database home, as described
|
||||
in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul>
|
||||
<br>
|
||||
<b>Supported Keywords</b>
|
||||
The following keywords are supported for the <b>-c</b> command-line
|
||||
option to the db_load utility. See <a href="../api_c/db_open.html">DB->open</a> for further
|
||||
discussion of these keywords and what values should be specified.
|
||||
<p>The parenthetical listing specifies how the value part of the
|
||||
<b>name=value</b> pair is interpreted. Items listed as (boolean)
|
||||
expect value to be <b>1</b> (set) or <b>0</b> (unset). Items listed
|
||||
as (number) convert value to a number. Items listed as (string) use
|
||||
the string value without modification.</p>
|
||||
<br>
|
||||
<b>bt_minkey (number)</b><ul compact><li>The minimum number of keys per page.</ul>
|
||||
<b>chksum (boolean)</b><ul compact><li>Enable page checksums.</ul>
|
||||
<b>database (string)</b><ul compact><li>The database to load.</ul>
|
||||
<b>db_lorder (number)</b><ul compact><li>The byte order for integers in the stored database metadata.</ul>
|
||||
<b>db_pagesize (number)</b><ul compact><li>The size of database pages, in bytes.</ul>
|
||||
<b>duplicates (boolean)</b><ul compact><li>The value of the <a href="../api_c/db_set_flags.html#DB_DUP">DB_DUP</a> flag.</ul>
|
||||
<b>dupsort (boolean)</b><ul compact><li>The value of the <a href="../api_c/db_set_flags.html#DB_DUPSORT">DB_DUPSORT</a> flag.</ul>
|
||||
<b>extentsize (number)</b><ul compact><li>The size of database extents, in pages, for Queue databases configured
|
||||
to use extents.</ul>
|
||||
<b>h_ffactor (number)</b><ul compact><li>The density within the Hash database.</ul>
|
||||
<b>h_nelem (number)</b><ul compact><li>The size of the Hash database.</ul>
|
||||
<b>keys (boolean)</b><ul compact><li>Specify whether keys are present for Queue or Recno databases.</ul>
|
||||
<b>re_len (number)</b><ul compact><li>Specify fixed-length records of the specified length.</ul>
|
||||
<b>re_pad (string)</b><ul compact><li>Specify the fixed-length record pad character.</ul>
|
||||
<b>recnum (boolean)</b><ul compact><li>The value of the <a href="../api_c/db_set_flags.html#DB_RECNUM">DB_RECNUM</a> flag.</ul>
|
||||
<b>renumber (boolean)</b><ul compact><li>The value of the <a href="../api_c/db_set_flags.html#DB_RENUMBER">DB_RENUMBER</a> flag.</ul>
|
||||
<b>subdatabase (string)</b><ul compact><li>The subdatabase to load.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
66
docs/utility/db_printlog.html
Normal file
66
docs/utility/db_printlog.html
Normal file
@@ -0,0 +1,66 @@
|
||||
<!--$Id: db_printlog.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: db_printlog</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>db_printlog</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>db_printlog [<b>-NrV</b>] [<b>-b start-LSN</b>] [<b>-e stop-LSN</b>] [<b>-h home</b>] [<b>-P password</b>]</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The db_printlog utility is a debugging utility that dumps Berkeley DB
|
||||
log files in a human-readable format.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-b</b><ul compact><li>Display log records starting at log sequence number (LSN) <b>start-LSN</b>;
|
||||
<b>start-LSN</b> is specified as a file number, followed by a slash (/)
|
||||
character, followed by an offset number, with no intervening whitespace.</ul>
|
||||
<b>-e</b><ul compact><li>Stop displaying log records at log sequence number (LSN) <b>stop-LSN</b>;
|
||||
<b>stop-LSN</b> is specified as a file number, followed by a slash (/)
|
||||
character, followed by an offset number, with no intervening whitespace.</ul>
|
||||
<b>-h</b><ul compact><li>Specify a home directory for the database environment; by
|
||||
default, the current working directory is used.</ul>
|
||||
<b>-N</b><ul compact><li>Do not acquire shared region mutexes while running. Other problems,
|
||||
such as potentially fatal errors in Berkeley DB, will be ignored as well.
|
||||
This option is intended only for debugging errors, and should not be
|
||||
used under any other circumstances.</ul>
|
||||
<b>-P</b><ul compact><li>Specify an environment password. Although Berkeley DB utilities overwrite
|
||||
password strings as soon as possible, be aware there may be a window of
|
||||
vulnerability on systems where unprivileged users can see command-line
|
||||
arguments or where utilities are not able to overwrite the memory
|
||||
containing the command-line arguments.</ul>
|
||||
<b>-r</b><ul compact><li>Read the log files in reverse order.</ul>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<br>
|
||||
<p>For more information on the db_printlog output and using it to
|
||||
debug applications, see <a href="../ref/debug/printlog.html">Reviewing
|
||||
Berkeley DB log files</a>.</p>
|
||||
<p>The db_printlog utility uses a Berkeley DB environment (as described for the
|
||||
<b>-h</b> option, the environment variable <b>DB_HOME</b>, or
|
||||
because the utility was run in a directory containing a Berkeley DB
|
||||
environment). In order to avoid environment corruption when using a
|
||||
Berkeley DB environment, db_printlog should always be given the chance to
|
||||
detach from the environment and exit gracefully. To cause db_printlog
|
||||
to release all environment resources and exit cleanly, send it an
|
||||
interrupt signal (SIGINT).</p>
|
||||
<p>The db_printlog utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<br><b>Environment Variables</b>
|
||||
<br>
|
||||
<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable
|
||||
DB_HOME is set, it is used as the path of the database home, as described
|
||||
in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
93
docs/utility/db_recover.html
Normal file
93
docs/utility/db_recover.html
Normal file
@@ -0,0 +1,93 @@
|
||||
<!--$Id: db_recover.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: db_recover</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>db_recover</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>db_recover [<b>-cefVv</b>] [<b>-h home</b>] [<b>-P password</b>] [<b>-t [[CC]YY]MMDDhhmm[.SS]]</b>]</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The db_recover utility must be run after an unexpected application,
|
||||
Berkeley DB, or system failure to restore the database to a consistent state.
|
||||
All committed transactions are guaranteed to appear after db_recover
|
||||
has run, and all uncommitted transactions will be completely undone.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-c</b><ul compact><li>Perform catastrophic recovery instead of normal recovery.</ul>
|
||||
<b>-e</b><ul compact><li>Retain the environment after running recovery. This option
|
||||
will rarely be used unless a <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is present in the
|
||||
home directory. If a <a href="../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a> file is not present, then the
|
||||
regions will be created with default parameter values.</ul>
|
||||
<b>-f</b><ul compact><li>Display a message on the standard output showing the
|
||||
percent of recovery completed.</ul>
|
||||
<b>-h</b><ul compact><li>Specify a home directory for the database environment; by
|
||||
default, the current working directory is used.</ul>
|
||||
<b>-P</b><ul compact><li>Specify an environment password. Although Berkeley DB utilities overwrite
|
||||
password strings as soon as possible, be aware there may be a window of
|
||||
vulnerability on systems where unprivileged users can see command-line
|
||||
arguments or where utilities are not able to overwrite the memory
|
||||
containing the command-line arguments.</ul>
|
||||
<b>-t</b><ul compact><li>Recover to the time specified rather than to the most current possible
|
||||
date. The timestamp argument should be in the form
|
||||
[[CC]YY]MMDDhhmm[.SS] where each pair of
|
||||
letters represents the following:</ul>
|
||||
<br>
|
||||
<b>CC</b><ul compact><li>The first two digits of the year (the century).</ul>
|
||||
<b>YY</b><ul compact><li>The second two digits of the year. If "YY" is specified, but "CC" is not,
|
||||
a value for "YY" between 69 and 99 results in a "CC" value of 19. Otherwise,
|
||||
a "CC" value of 20 is used.</ul>
|
||||
<b>MM</b><ul compact><li>The month of the year, from 1 to 12.</ul>
|
||||
<b>DD</b><ul compact><li>The day of the month, from 1 to 31.</ul>
|
||||
<b>hh</b><ul compact><li>The hour of the day, from 0 to 23.</ul>
|
||||
<b>mm</b><ul compact><li>The minute of the hour, from 0 to 59.</ul>
|
||||
<b>SS</b><ul compact><li>The second of the minute, from 0 to 61.</ul>
|
||||
<br>
|
||||
<p>If the "CC" and "YY" letter pairs are not specified, the values default
|
||||
to the current year. If the "SS" letter pair is not specified, the value
|
||||
defaults to 0.</p>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<b>-v</b><ul compact><li>Run in verbose mode.</ul>
|
||||
<br>
|
||||
<p>In the case of catastrophic recovery, an archival copy -- or
|
||||
<i>snapshot</i> -- of all database files must be restored along with
|
||||
all of the log files written since the database file snapshot was made.
|
||||
(If disk space is a problem, log files may be referenced by symbolic
|
||||
links). For further information on creating a database snapshot, see
|
||||
<a href="../ref/transapp/archival.html">Archival Procedures</a>. For
|
||||
further information on performing recovery, see
|
||||
<a href="../ref/transapp/recovery.html">Recovery Procedures</a>.</p>
|
||||
<p>If the failure was not catastrophic, the files present on the system at the
|
||||
time of failure are sufficient to perform recovery.</p>
|
||||
<p>If log files are missing, db_recover will identify the missing
|
||||
log file(s) and fail, in which case the missing log files need to be
|
||||
restored and recovery performed again.</p>
|
||||
<p>The db_recover utility uses a Berkeley DB environment (as described for the
|
||||
<b>-h</b> option, the environment variable <b>DB_HOME</b>, or
|
||||
because the utility was run in a directory containing a Berkeley DB
|
||||
environment). In order to avoid environment corruption when using a
|
||||
Berkeley DB environment, db_recover should always be given the chance to
|
||||
detach from the environment and exit gracefully. To cause db_recover
|
||||
to release all environment resources and exit cleanly, send it an
|
||||
interrupt signal (SIGINT).</p>
|
||||
<p>The db_recover utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<br><b>Environment Variables</b>
|
||||
<br>
|
||||
<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable
|
||||
DB_HOME is set, it is used as the path of the database home, as described
|
||||
in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
100
docs/utility/db_stat.html
Normal file
100
docs/utility/db_stat.html
Normal file
@@ -0,0 +1,100 @@
|
||||
<!--$Id: db_stat.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: db_stat</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>db_stat</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>db_stat <b>-d</b> <b>file</b> [<b>-fN</b>] [<b>-h home</b>] [<b>-P password</b>] [<b>-s database</b>]
|
||||
db_stat [<b>-cEelmNrtVxZ</b>] [<b>-C Aclop</b>] [<b>-h home</b>] [<b>-L A</b>] [<b>-M A</b>] [<b>-R A</b>] [<b>-P password</b>]</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a>
|
||||
<p>The db_stat utility displays statistics for Berkeley DB environments.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-C</b><ul compact><li>Display detailed information about the locking subsystem.
|
||||
<br>
|
||||
<b>A</b><ul compact><li>Display all information.</ul>
|
||||
<b>c</b><ul compact><li>Display lock conflict matrix.</ul>
|
||||
<b>l</b><ul compact><li>Display lockers within hash chains.</ul>
|
||||
<b>o</b><ul compact><li>Display lock objects within hash chains.</ul>
|
||||
<b>p</b><ul compact><li>Display locking subsystem parameters.</ul>
|
||||
<br></ul>
|
||||
<b>-c</b><ul compact><li>Display locking subsystem statistics, as described in <a href="../api_c/lock_stat.html">DB_ENV->lock_stat</a>.</ul>
|
||||
<b>-d</b><ul compact><li>Display database statistics for the specified file, as described in
|
||||
<a href="../api_c/db_stat.html">DB->stat</a>.
|
||||
<p>If the database contains multiple databases and the <b>-s</b> flag is
|
||||
not specified, the statistics are for the internal database that describes
|
||||
the other databases the file contains, and not for the file as a whole.</p></ul>
|
||||
<b>-E</b><ul compact><li>Display detailed information about the database environment.</ul>
|
||||
<b>-e</b><ul compact><li>Display information about the database environment, including
|
||||
all configured subsystems of the database environment.</ul>
|
||||
<b>-f</b><ul compact><li>Display only those database statistics that can be
|
||||
acquired without traversing the database.</ul>
|
||||
<b>-h</b><ul compact><li>Specify a home directory for the database environment; by
|
||||
default, the current working directory is used.</ul>
|
||||
<b>-l</b><ul compact><li>Display logging subsystem statistics, as described in <a href="../api_c/log_stat.html">DB_ENV->log_stat</a>.</ul>
|
||||
<b>-M</b><ul compact><li>Display detailed information about the cache.</ul>
|
||||
<br>
|
||||
<b>A</b><ul compact><li>Display all information.</ul>
|
||||
<b>h</b><ul compact><li>Display buffers within hash chains.</ul>
|
||||
<br>
|
||||
<b>-m</b><ul compact><li>Display cache statistics, as described in <a href="../api_c/memp_stat.html">DB_ENV->memp_stat</a>.</ul>
|
||||
<b>-N</b><ul compact><li>Do not acquire shared region mutexes while running. Other problems,
|
||||
such as potentially fatal errors in Berkeley DB, will be ignored as well.
|
||||
This option is intended only for debugging errors, and should not be
|
||||
used under any other circumstances.</ul>
|
||||
<b>-P</b><ul compact><li>Specify an environment password. Although Berkeley DB utilities overwrite
|
||||
password strings as soon as possible, be aware there may be a window of
|
||||
vulnerability on systems where unprivileged users can see command-line
|
||||
arguments or where utilities are not able to overwrite the memory
|
||||
containing the command-line arguments.</ul>
|
||||
<b>-R</b><ul compact><li>Display detailed information about the replication subsystem.</ul>
|
||||
<br>
|
||||
<b>A</b><ul compact><li>Display all information.</ul>
|
||||
<br>
|
||||
<b>-r</b><ul compact><li>Display replication statistics, as described in <a href="../api_c/rep_stat.html">DB_ENV->rep_stat</a>.</ul>
|
||||
<b>-s</b><ul compact><li>Display statistics for the specified database contained in the file
|
||||
specified with the <b>-d</b> flag.</ul>
|
||||
<b>-t</b><ul compact><li>Display transaction subsystem statistics, as described in <a href="../api_c/txn_stat.html">DB_ENV->txn_stat</a>.</ul>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<b>-x</b><ul compact><li>Display mutex subsystem statistics, as described in <a href="../api_c/mutex_stat.html">DB_ENV->mutex_stat</a>.</ul>
|
||||
<b>-Z</b><ul compact><li>Reset the statistics after reporting them; valid only with the <b>-C</b>,
|
||||
<b>-c</b>, <b>-E</b>, <b>-e</b>, <b>-L</b>, <b>-l</b>,
|
||||
<b>-M</b>, <b>-m</b>, <b>-R</b>, <b>-r</b>, and <b>-t</b>
|
||||
options.</ul>
|
||||
<br>
|
||||
<p>Values normally displayed in quantities of bytes are displayed as a
|
||||
combination of gigabytes (GB), megabytes (MB), kilobytes (KB), and bytes
|
||||
(B). Otherwise, values smaller than 10 million are displayed without
|
||||
any special notation, and values larger than 10 million are displayed
|
||||
as a number followed by "M".</p>
|
||||
<p>The db_stat utility may be used with a Berkeley DB environment (as described for the
|
||||
<b>-h</b> option, the environment variable <b>DB_HOME</b>, or
|
||||
because the utility was run in a directory containing a Berkeley DB
|
||||
environment). In order to avoid environment corruption when using a
|
||||
Berkeley DB environment, db_stat should always be given the chance to
|
||||
detach from the environment and exit gracefully. To cause db_stat
|
||||
to release all environment resources and exit cleanly, send it an
|
||||
interrupt signal (SIGINT).</p>
|
||||
<p>The db_stat utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<br><b>Environment Variables</b>
|
||||
<br>
|
||||
<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable
|
||||
DB_HOME is set, it is used as the path of the database home, as described
|
||||
in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
84
docs/utility/db_upgrade.html
Normal file
84
docs/utility/db_upgrade.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<!--$Id: db_upgrade.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: db_upgrade</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>db_upgrade</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>db_upgrade [<b>-NsVv</b>] [<b>-h home</b>] [<b>-P password</b>] file ...</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a><a name="3"><!--meow--></a>
|
||||
<p>The db_upgrade utility upgrades the Berkeley DB version of one or more
|
||||
files and the databases they contain to the current release version.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-h</b><ul compact><li>Specify a home directory for the database environment; by
|
||||
default, the current working directory is used.</ul>
|
||||
<b>-N</b><ul compact><li>Do not acquire shared region mutexes while running. Other problems,
|
||||
such as potentially fatal errors in Berkeley DB, will be ignored as well.
|
||||
This option is intended only for debugging errors, and should not be
|
||||
used under any other circumstances.</ul>
|
||||
<b>-P</b><ul compact><li>Specify an environment password. Although Berkeley DB utilities overwrite
|
||||
password strings as soon as possible, be aware there may be a window of
|
||||
vulnerability on systems where unprivileged users can see command-line
|
||||
arguments or where utilities are not able to overwrite the memory
|
||||
containing the command-line arguments.</ul>
|
||||
<b>-s</b><ul compact><li>This flag is only meaningful when upgrading databases from releases
|
||||
before the Berkeley DB 3.1 release.
|
||||
<p>As part of the upgrade from the Berkeley DB 3.0 release to the 3.1 release,
|
||||
the on-disk format of duplicate data items changed. To correctly upgrade
|
||||
the format requires that applications specify whether duplicate data
|
||||
items in the database are sorted or not. Specifying the <b>-s</b>
|
||||
flag means that the duplicates are sorted; otherwise, they are assumed
|
||||
to be unsorted. Incorrectly specifying the value of this flag may lead
|
||||
to database corruption.</p>
|
||||
<p>Because the db_upgrade utility upgrades a physical file
|
||||
(including all the databases it contains), it is not possible to use
|
||||
db_upgrade to upgrade files where some of the databases it
|
||||
includes have sorted duplicate data items, and some of the databases it
|
||||
includes have unsorted duplicate data items. If the file does not have
|
||||
more than a single database, if the databases do not support duplicate
|
||||
data items, or if all the databases that support duplicate data items
|
||||
support the same style of duplicates (either sorted or unsorted),
|
||||
db_upgrade will work correctly as long as the <b>-s</b> flag
|
||||
is correctly specified. Otherwise, the file cannot be upgraded using
|
||||
db_upgrade, and must be upgraded manually using the
|
||||
<a href="../utility/db_dump.html">db_dump</a> and <a href="../utility/db_load.html">db_load</a> utilities.</p></ul>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<b>-v</b><ul compact><li>Run in verbose mode, displaying a message for each successful upgrade.</ul>
|
||||
<br>
|
||||
<p><b>It is important to realize that Berkeley DB database upgrades are done
|
||||
in place, and so are potentially destructive.</b> This means that if the
|
||||
system crashes during the upgrade procedure, or if the upgrade procedure
|
||||
runs out of disk space, the databases may be left in an inconsistent and
|
||||
unrecoverable state. See <a href="../ref/am/upgrade.html">Upgrading
|
||||
databases</a> for more information.</p>
|
||||
<p>The db_upgrade utility may be used with a Berkeley DB environment (as described for the
|
||||
<b>-h</b> option, the environment variable <b>DB_HOME</b>, or
|
||||
because the utility was run in a directory containing a Berkeley DB
|
||||
environment). In order to avoid environment corruption when using a
|
||||
Berkeley DB environment, db_upgrade should always be given the chance to
|
||||
detach from the environment and exit gracefully. To cause db_upgrade
|
||||
to release all environment resources and exit cleanly, send it an
|
||||
interrupt signal (SIGINT).</p>
|
||||
<p>The db_upgrade utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<br><b>Environment Variables</b>
|
||||
<br>
|
||||
<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable
|
||||
DB_HOME is set, it is used as the path of the database home, as described
|
||||
in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
72
docs/utility/db_verify.html
Normal file
72
docs/utility/db_verify.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!--$Id: db_verify.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: db_verify</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<table width="100%"><tr valign=top>
|
||||
<td>
|
||||
<b>db_verify</b>
|
||||
</td>
|
||||
</tr></table>
|
||||
<hr size=1 noshade>
|
||||
<tt>
|
||||
<b><pre>db_verify [<b>-NoqV</b>] [<b>-h home</b>] [<b>-P password</b>] file ...</pre></b>
|
||||
<b>Description</b>
|
||||
<a name="2"><!--meow--></a><a name="3"><!--meow--></a>
|
||||
<p>The db_verify utility verifies the structure of one or more
|
||||
files and the databases they contain.</p>
|
||||
<p>The options are as follows:</p>
|
||||
<br>
|
||||
<b>-h</b><ul compact><li>Specify a home directory for the database environment; by
|
||||
default, the current working directory is used.</ul>
|
||||
<b>-o</b><ul compact><li>Skip the database checks for btree and duplicate sort order and for
|
||||
hashing.
|
||||
<p>If the file being verified contains databases with non-default
|
||||
comparison or hashing configurations, calling the db_verify
|
||||
utility without the <b>-o</b> flag will usually return failure. The
|
||||
<b>-o</b> flag causes db_verify to ignore database sort or
|
||||
hash ordering and allows db_verify to be used on these files.
|
||||
To fully verify these files, verify them explicitly using the
|
||||
<a href="../api_c/db_verify.html">DB->verify</a> method, after configuring the correct comparison or hashing
|
||||
functions.</p></ul>
|
||||
<b>-N</b><ul compact><li>Do not acquire shared region mutexes while running. Other problems,
|
||||
such as potentially fatal errors in Berkeley DB, will be ignored as well.
|
||||
This option is intended only for debugging errors, and should not be
|
||||
used under any other circumstances.</ul>
|
||||
<b>-P</b><ul compact><li>Specify an environment password. Although Berkeley DB utilities overwrite
|
||||
password strings as soon as possible, be aware there may be a window of
|
||||
vulnerability on systems where unprivileged users can see command-line
|
||||
arguments or where utilities are not able to overwrite the memory
|
||||
containing the command-line arguments.</ul>
|
||||
<b>-q</b><ul compact><li>Suppress the printing of any error descriptions, simply exit success or
|
||||
failure.</ul>
|
||||
<b>-V</b><ul compact><li>Write the library version number to the standard output, and exit.</ul>
|
||||
<br>
|
||||
<p><b>The db_verify utility does not perform any locking, even in
|
||||
Berkeley DB environments that are configured with a locking subsystem. As
|
||||
such, it should only be used on files that are not being modified by
|
||||
another thread of control.</b></p>
|
||||
<p>The db_verify utility may be used with a Berkeley DB environment (as described for the
|
||||
<b>-h</b> option, the environment variable <b>DB_HOME</b>, or
|
||||
because the utility was run in a directory containing a Berkeley DB
|
||||
environment). In order to avoid environment corruption when using a
|
||||
Berkeley DB environment, db_verify should always be given the chance to
|
||||
detach from the environment and exit gracefully. To cause db_verify
|
||||
to release all environment resources and exit cleanly, send it an
|
||||
interrupt signal (SIGINT).</p>
|
||||
<p>The db_verify utility exits 0 on success, and >0 if an error occurs.</p>
|
||||
<br><b>Environment Variables</b>
|
||||
<br>
|
||||
<b>DB_HOME</b><ul compact><li>If the <b>-h</b> option is not specified and the environment variable
|
||||
DB_HOME is set, it is used as the path of the database home, as described
|
||||
in <a href="../api_c/env_open.html">DB_ENV->open</a>.</ul>
|
||||
<br>
|
||||
</tt>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
30
docs/utility/index.html
Normal file
30
docs/utility/index.html
Normal file
@@ -0,0 +1,30 @@
|
||||
<!--$Id: index.html 63573 2008-05-23 21:43:21Z trent.nelson $-->
|
||||
<!--Copyright (c) 1997,2008 Oracle. All rights reserved.-->
|
||||
<!--See the file LICENSE for redistribution information.-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Berkeley DB: Berkeley DB Supporting Utilities</title>
|
||||
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
|
||||
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
|
||||
</head>
|
||||
<body bgcolor=white>
|
||||
<p align=center><b>Berkeley DB Supporting Utilities</b></p>
|
||||
<table border=1 align=center>
|
||||
<tr><th>Utility</th><th>Description</th></tr>
|
||||
<tr><td><a href="../utility/berkeley_db_svc.html">berkeley_db_svc</a></td><td>RPC server utility</td></tr>
|
||||
<tr><td><a href="../utility/db_archive.html">db_archive</a></td><td>Archival utility</td></tr>
|
||||
<tr><td><a href="../utility/db_checkpoint.html">db_checkpoint</a></td><td>Transaction checkpoint utility</td></tr>
|
||||
<tr><td><a href="../utility/db_codegen.html">db_codegen</a></td><td>Code generation utility</td></tr>
|
||||
<tr><td><a href="../utility/db_deadlock.html">db_deadlock</a></td><td>Deadlock detection utility</td></tr>
|
||||
<tr><td><a href="../utility/db_dump.html">db_dump</a></td><td>Database dump utility</td></tr>
|
||||
<tr><td><a href="../utility/db_hotbackup.html">db_hotbackup</a></td><td>Hot backup utility</td></tr>
|
||||
<tr><td><a href="../utility/db_load.html">db_load</a></td><td>Database load utility</td></tr>
|
||||
<tr><td><a href="../utility/db_printlog.html">db_printlog</a></td><td>Transaction log display utility</td></tr>
|
||||
<tr><td><a href="../utility/db_recover.html">db_recover</a></td><td>Recovery utility</td></tr>
|
||||
<tr><td><a href="../utility/db_stat.html">db_stat</a></td><td>Statistics utility</td></tr>
|
||||
<tr><td><a href="../utility/db_upgrade.html">db_upgrade</a></td><td>Database upgrade utility</td></tr>
|
||||
<tr><td><a href="../utility/db_verify.html">db_verify</a></td><td>Verification utility</td></tr>
|
||||
</table>
|
||||
<p><font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user