diff options
Diffstat (limited to 'bdb/docs/ref/env')
-rw-r--r-- | bdb/docs/ref/env/create.html | 73 | ||||
-rw-r--r-- | bdb/docs/ref/env/error.html | 57 | ||||
-rw-r--r-- | bdb/docs/ref/env/intro.html | 56 | ||||
-rw-r--r-- | bdb/docs/ref/env/naming.html | 145 | ||||
-rw-r--r-- | bdb/docs/ref/env/open.html | 30 | ||||
-rw-r--r-- | bdb/docs/ref/env/region.html | 66 | ||||
-rw-r--r-- | bdb/docs/ref/env/remote.html | 48 | ||||
-rw-r--r-- | bdb/docs/ref/env/security.html | 54 |
8 files changed, 0 insertions, 529 deletions
diff --git a/bdb/docs/ref/env/create.html b/bdb/docs/ref/env/create.html deleted file mode 100644 index 374c7a6e005..00000000000 --- a/bdb/docs/ref/env/create.html +++ /dev/null @@ -1,73 +0,0 @@ -<!--$Id: create.so,v 10.23 2000/12/04 18:05:41 bostic Exp $--> -<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.--> -<!--All rights reserved.--> -<html> -<head> -<title>Berkeley DB Reference Guide: Creating an Environment</title> -<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> -<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++"> -</head> -<body bgcolor=white> - <a name="2"><!--meow--></a> -<table><tr valign=top> -<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Environment</dl></h3></td> -<td width="1%"><a href="../../ref/env/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/naming.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p> -<h1 align=center>Creating an Environment</h1> -<p>The <a href="../../api_c/env_open.html">DBENV->open</a> function is the standard function for creating or -joining a database environment. Transaction-protected or multi-process -applications should call <a href="../../api_c/env_open.html">DBENV->open</a> before making any other calls -to the Berkeley DB library. Applications must obtain an environment handle from -the <a href="../../api_c/env_create.html">db_env_create</a> function before calling <a href="../../api_c/env_open.html">DBENV->open</a>. -There are a large number of options that you can set to customize -<a href="../../api_c/env_open.html">DBENV->open</a> for your environment. These options fall into four -broad categories: -<p><dl compact> -<p><dt>Subsystem Initialization:<dd>These flags indicate which Berkeley DB subsystems will be initialized for the -environment, and, what operations will happen automatically when -databases are accessed within the environment. The flags include -<a href="../../api_c/env_open.html#DB_JOINENV">DB_JOINENV</a>, <a href="../../api_c/env_open.html#DB_INIT_CDB">DB_INIT_CDB</a>, <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> and <a href="../../api_c/env_open.html#DB_INIT_TXN">DB_INIT_TXN</a>. -The <a href="../../api_c/env_open.html#DB_INIT_CDB">DB_INIT_CDB</a> flag does initialization for Berkeley DB Concurrent Data Store -applications, see <a href="../../ref/cam/intro.html">Building Berkeley DB Concurrent Data Store -applications</a> for more information. The rest of the flags initialize -a single subsystem, e.g., when <a href="../../api_c/env_open.html#DB_INIT_LOCK">DB_INIT_LOCK</a> is specified, -applications reading and writing databases opened in this environment -will be using locking to ensure that they do not overwrite each other's -changes. -<p><dt>Recovery options:<dd>These flags indicate what recovery is to be performed on the environment -before it is opened for normal use, and include <a href="../../api_c/env_open.html#DB_RECOVER">DB_RECOVER</a> and -<a href="../../api_c/env_open.html#DB_RECOVER_FATAL">DB_RECOVER_FATAL</a>. -<p><dt>Naming options:<dd>These flags modify how file naming happens in the environment, and include -<a href="../../api_c/env_open.html#DB_USE_ENVIRON">DB_USE_ENVIRON</a> and <a href="../../api_c/env_open.html#DB_USE_ENVIRON_ROOT">DB_USE_ENVIRON_ROOT</a>. -<p><dt>Miscellaneous:<dd>Finally, there are a number of miscellaneous flags such as <a href="../../api_c/env_open.html#DB_CREATE">DB_CREATE</a> -which causes underlying files to be created as necessary. See the -<a href="../../api_c/env_open.html">DBENV->open</a> manual pages for further information. -</dl> -<p>Most applications either specify only the <a href="../../api_c/env_open.html#DB_INIT_MPOOL">DB_INIT_MPOOL</a> flag or -they specify all four subsystem initialization flags -(<a href="../../api_c/env_open.html#DB_INIT_MPOOL">DB_INIT_MPOOL</a>, <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> and -<a href="../../api_c/env_open.html#DB_INIT_TXN">DB_INIT_TXN</a>). The former configuration is for applications that -simply want to use the basic Access Method interfaces with a shared -underlying buffer pool, but don't care about recoverability after -application or system failure. The latter is for applications that need -recoverability. There are situations where other combinations of the -initialization flags make sense, but they are rare. -<p>The <a href="../../api_c/env_open.html#DB_RECOVER">DB_RECOVER</a> flag is specified by applications that want to -perform any necessary database recovery when they start running, i.e., if -there was a system or application failure the last time they ran, they -want the databases to be made consistent before they start running again. -It is not an error to specify this flag when no recovery needs to be -done. -<p>The <a href="../../api_c/env_open.html#DB_RECOVER_FATAL">DB_RECOVER_FATAL</a> flag is more special-purpose. It performs -catastrophic database recovery, and normally requires that some initial -arrangements be made, i.e., archived log files be brought back into the -filesystem. Applications should not normally specify this flag. Instead, -under these rare conditions, the <a href="../../utility/db_recover.html">db_recover</a> utility should be -used. -<table><tr><td><br></td><td width="1%"><a href="../../ref/env/intro.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/naming.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font> -</body> -</html> diff --git a/bdb/docs/ref/env/error.html b/bdb/docs/ref/env/error.html deleted file mode 100644 index 1a79d8fe550..00000000000 --- a/bdb/docs/ref/env/error.html +++ /dev/null @@ -1,57 +0,0 @@ -<!--$Id: error.so,v 10.13 2001/01/11 15:23:14 bostic Exp $--> -<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.--> -<!--All rights reserved.--> -<html> -<head> -<title>Berkeley DB Reference Guide: Error support</title> -<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> -<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++"> -</head> -<body bgcolor=white> -<table><tr valign=top> -<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Environment</dl></h3></td> -<td width="1%"><a href="../../ref/env/open.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/cam/intro.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p> -<h1 align=center>Error support</h1> -<p>Berkeley DB offers programmatic support for displaying error return values. -The <a href="../../api_c/env_strerror.html">db_strerror</a> interface returns a pointer to the error -message corresponding to any Berkeley DB error return, similar to the ANSI C -strerror interface, but able to handle both system error returns and -Berkeley DB specific return values. -<p>For example: -<p><blockquote><pre>int ret; -if ((ret = dbenv->set_cachesize(dbenv, 0, 32 * 1024)) != 0) { - fprintf(stderr, "set_cachesize failed: %s\n", db_strerror(ret)); - return (1); -}</pre></blockquote> -<p>There are also two additional error functions, <a href="../../api_c/db_err.html">DBENV->err</a> and -<a href="../../api_c/db_err.html">DBENV->errx</a>. These functions work like the ANSI C printf -interface, taking a printf-style format string and argument list, and -writing a message constructed from the format string and arguments. -<p>The <a href="../../api_c/db_err.html">DBENV->err</a> function appends the standard error string to the -constructed message and the <a href="../../api_c/db_err.html">DBENV->errx</a> function does not. -<p>Error messages can be configured always to include a prefix (e.g., the -program name) using the <a href="../../api_c/env_set_errpfx.html">DBENV->set_errpfx</a> interface. -<p>These functions provide simpler ways of displaying Berkeley DB error messages: -<p><blockquote><pre>int ret; -dbenv->set_errpfx(dbenv, argv0); -if ((ret = dbenv->open(dbenv, home, NULL, - DB_CREATE | DB_INIT_LOG | DB_INIT_TXN | DB_USE_ENVIRON)) - != 0) { - dbenv->err(dbenv, ret, "open: %s", home); - dbenv->errx(dbenv, - "contact your system administrator: session ID was %d", - session_id); - return (1); -}</pre></blockquote> -<p>For example, if the program was called "my_app", attempting to open an -environment home directory in "/tmp/home", and the open call returned a -permission error, the error messages shown would look like: -<p><blockquote><pre>my_app: open: /tmp/home: Permission denied. -my_app: contact your system administrator: session ID was 2</pre></blockquote> -<table><tr><td><br></td><td width="1%"><a href="../../ref/env/open.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/cam/intro.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font> -</body> -</html> diff --git a/bdb/docs/ref/env/intro.html b/bdb/docs/ref/env/intro.html deleted file mode 100644 index a555c2f0f9e..00000000000 --- a/bdb/docs/ref/env/intro.html +++ /dev/null @@ -1,56 +0,0 @@ -<!--$Id: intro.so,v 10.25 2000/03/18 21:43:12 bostic Exp $--> -<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.--> -<!--All rights reserved.--> -<html> -<head> -<title>Berkeley DB Reference Guide: Introduction</title> -<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> -<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++"> -</head> -<body bgcolor=white> -<table><tr valign=top> -<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Environment</dl></h3></td> -<td width="1%"><a href="../../ref/arch/utilities.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/create.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p> -<h1 align=center>Introduction</h1> -<p>A Berkeley DB environment is an encapsulation of one or more databases, log -files and shared information about the database environment such as shared -memory buffer cache pages. -<p>The simplest way to administer a Berkeley DB application environment is to -create a single <b>home</b> directory that stores the files for the -applications that will share the environment. The environment home -directory must be created before any Berkeley DB applications are run. Berkeley DB -itself never creates the environment home directory. The environment can -then be identified by the name of that directory. -<p>An environment may be shared by any number of applications as well as by -any number of threads within the applications. It is possible for an -environment to include resources from other directories on the system, -and applications often choose to distribute resources to other directories -or disks for performance or other reasons. However, by default, the -databases, shared regions (the locking, logging, memory pool, and -transaction shared memory areas) and log files will be stored in a single -directory hierarchy. -<p>It is important to realize that all applications sharing a database -environment implicitly trust each other. They have access to each other's -data as it resides in the shared regions and they will share resources -such as buffer space and locks. At the same time, any applications using -the same databases <b>must</b> share an environment if consistency is -to be maintained between them. -<p>The Berkeley DB environment is created and described by the <a href="../../api_c/env_create.html">db_env_create</a> -and <a href="../../api_c/env_open.html">DBENV->open</a> interfaces. In situations where customization is -desired, such as storing log files on a separate disk drive, applications -must describe the customization by either creating an environment -configuration file in the environment home directory or by arguments -passed to the <a href="../../api_c/env_open.html">DBENV->open</a> interface. See the documentation on that -function for details on this procedure. -<p>Once an environment has been created, database files specified using -relative pathnames will be named relative to the home directory. Using -pathnames relative to the home directory allows the entire environment -to be easily moved to facilitate restoring and recovering a database in -a different directory or on a different system. -<table><tr><td><br></td><td width="1%"><a href="../../ref/arch/utilities.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/create.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font> -</body> -</html> diff --git a/bdb/docs/ref/env/naming.html b/bdb/docs/ref/env/naming.html deleted file mode 100644 index fd575396210..00000000000 --- a/bdb/docs/ref/env/naming.html +++ /dev/null @@ -1,145 +0,0 @@ -<!--$Id: naming.so,v 10.36 2001/01/09 15:36:10 bostic Exp $--> -<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.--> -<!--All rights reserved.--> -<html> -<head> -<title>Berkeley DB Reference Guide: File naming</title> -<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> -<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++"> -</head> -<body bgcolor=white> - <a name="2"><!--meow--></a> -<table><tr valign=top> -<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Environment</dl></h3></td> -<td width="1%"><a href="../../ref/env/create.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/security.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p> -<h1 align=center>File naming</h1> -<p>The most important task of the environment is to structure file naming -within Berkeley DB. -<p>Each of the locking, logging, memory pool and transaction subsystems of -Berkeley DB require shared memory regions, backed by the filesystem. Further, -cooperating applications (or multiple invocations of the same application) -must agree on the location of the shared memory regions and other files -used by the Berkeley DB subsystems, the log files used by the logging subsystem, -and, of course, the data files. Although it is possible to specify full -pathnames to all Berkeley DB functions, this is cumbersome and requires -that applications be recompiled when database files are moved. -<p>Applications are normally expected to specify a single directory home for -their database. This can be done easily in the call to <a href="../../api_c/env_open.html">DBENV->open</a> -by specifying a value for the <b>db_home</b> argument. There are more -complex configurations where it may be desirable to override -<b>db_home</b> or provide supplementary path information. -<h3>Specifying file naming to Berkeley DB</h3> -<p>The following describes the possible ways in which file naming information -may be specified to the Berkeley DB library. The specific circumstances and -order in which these ways are applied are described in a subsequent -paragraph. -<p><dl compact> -<p><dt><b><a name="db_home">db_home</a></b><dd>If the <b>db_home</b> argument to <a href="../../api_c/env_open.html">DBENV->open</a> is non-NULL, its -value may be used as the database home, and files named relative to its -path. -<p><dt><a name="DB_HOME">DB_HOME</a><dd>If the DB_HOME environment variable is set when <a href="../../api_c/env_open.html">DBENV->open</a> is -called, its value may be used as the database home, and files named -relative to its path. -<p>The DB_HOME environment variable is intended to permit users and system -administrators to override application and installation defaults, e.g.: -<p><blockquote><pre>env DB_HOME=/database/my_home application</pre></blockquote> -<p>Application writers are encouraged to support the <b>-h</b> option -found in the supporting Berkeley DB utilities to let users specify a database -home. -<p><dt>DB_ENV methods<dd>There are three DB_ENV methods that affect file naming. The -<a href="../../api_c/env_set_data_dir.html">DBENV->set_data_dir</a> function specifies a directory to search for database -files. The <a href="../../api_c/env_set_lg_dir.html">DBENV->set_lg_dir</a> function specifies a directory in which to -create logging files. The <a href="../../api_c/env_set_tmp_dir.html">DBENV->set_tmp_dir</a> function specifies a -directory in which to create backing temporary files. These methods are -intended to permit applications to customize file location for a database. -For example, an application writer can place data files and log files in -different directories, or instantiate a new log directory each time the -application runs. -<p><dt><a name="DB_CONFIG">DB_CONFIG</a><dd>The same information specified to the above DB_ENV methods may also -be specified using a configuration file. If an environment home directory -has been specified (either by the application specifying a non-NULL -<b>db_home</b> argument to <a href="../../api_c/env_open.html">DBENV->open</a>, or by the application -setting the DB_USE_ENVIRON or DB_USE_ENVIRON_ROOT flags and the DB_HOME -environment variable being set), any file named <b>DB_CONFIG</b> in the -database home directory will be read for lines of the format <b>NAME -VALUE</b>. -<p>The characters delimiting the two parts of the entry may be one or more -whitespace characters, and trailing whitespace characters are discarded. -All empty lines or lines whose first character is a whitespace or hash -(<b>#</b>) character will be ignored. Each line must specify both -the NAME and the VALUE of the pair. The specific NAME VALUE pairs are -documented in the manual <a href="../../api_c/env_set_data_dir.html">DBENV->set_data_dir</a>, -<a href="../../api_c/env_set_lg_dir.html">DBENV->set_lg_dir</a> and <a href="../../api_c/env_set_tmp_dir.html">DBENV->set_tmp_dir</a> pages. -<p>The DB_CONFIG configuration file is intended to permit systems to -customize file location for an environment independent of applications -using that database. For example, a database administrator can move the -database log and data files to a different location without application -recompilation. -</dl> -<h3>File name resolution in Berkeley DB</h3> -<p>The following describes the specific circumstances and order in which the -different ways of specifying file naming information are applied. Berkeley DB -file name processing proceeds sequentially through the following steps: -<p><dl compact> -<p><dt>absolute pathnames<dd>If the file name specified to a Berkeley DB function is an absolute pathname, -that file name is used without modification by Berkeley DB. -<p>On UNIX systems, an absolute pathname is defined as any pathname that -begins with a leading slash (<b>/</b>). -<p>On Windows systems, an absolute pathname is any pathname that begins with -a leading slash or leading backslash (<b>\</b>), or any -pathname beginning with a single alphabetic character, a colon and a -leading slash or backslash, e.g., <b>C:/tmp</b>. -<p><dt>DB_ENV methods, DB_CONFIG<dd>If a relevant configuration string (e.g., set_data_dir), is specified -either by calling a DB_ENV method or as a line in the DB_CONFIG -configuration file, the VALUE from the <b>NAME VALUE</b> pair is -prepended to the current file name. If the resulting file name is an -absolute pathname, the file name is used without further modification by -Berkeley DB. -<p><dt><b>db_home</b><dd>If the application specified a non-NULL <b>db_home</b> argument to -<a href="../../api_c/env_open.html">DBENV->open</a> its value is prepended to the current file name. If -the resulting file name is an absolute pathname, the file name is used -without further modification by Berkeley DB. -<p><dt>DB_HOME<dd>If the <b>db_home</b> argument is null, the DB_HOME environment variable -was set and the application has set the appropriate DB_USE_ENVIRON or -DB_USE_ENVIRON_ROOT environment variable, its value is prepended to the -current file name. If the resulting file name is an absolute pathname, -the file name is used without further modification by Berkeley DB. -<p><dt>(nothing)<dd>Finally, all file names are interpreted relative to the current working -directory of the process. -</dl> -<p>The common model for a Berkeley DB environment is one where only the DB_HOME -environment variable, or the <b>db_home</b> argument, is specified. In -this case, all data file names are relative to that directory, and all -files created by the Berkeley DB subsystems will be created in that directory. -<p>The more complex model for a transaction environment might be one where -a database home is specified, using either the DB_HOME environment -variable or the <b>db_home</b> argument to <a href="../../api_c/env_open.html">DBENV->open</a>, and then -the data directory and logging directory are set to the relative path -names of directories underneath the environment home. -<h3>Examples</h3> -Store all files in the directory <b>/a/database</b>: -<p><blockquote><pre>DBENV->open(DBENV, "/a/database", ...);</pre></blockquote> -Create temporary backing files in <b>/b/temporary</b>, and all other files -in <b>/a/database</b>: -<p><blockquote><pre>DBENV->set_tmp_dir(DBENV, "/b/temporary"); -DBENV->open(DBENV, "/a/database", ...);</pre></blockquote> -Store data files in <b>/a/database/datadir</b>, log files in -<b>/a/database/logdir</b>, and all other files in the directory -<b>/a/database</b>: -<p><blockquote><pre>DBENV->set_lg_dir("logdir"); -DBENV->set_data_dir("datadir"); -DBENV->open(DBENV, "/a/database", ...);</pre></blockquote> -<p>Store data files in <b>/a/database/data1</b> and <b>/b/data2</b>, and -all other files in the directory <b>/a/database</b>. Any data files -that are created will be created in <b>/b/data2</b>, because it is the -first DB_DATA_DIR directory specified: -<p><blockquote><pre>DBENV->set_data_dir(DBENV, "/b/data2"); -DBENV->set_data_dir(DBENV, "data1"); -DBENV->open(DBENV, "/a/database", ...);</pre></blockquote> -<table><tr><td><br></td><td width="1%"><a href="../../ref/env/create.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/security.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font> -</body> -</html> diff --git a/bdb/docs/ref/env/open.html b/bdb/docs/ref/env/open.html deleted file mode 100644 index f13675c7365..00000000000 --- a/bdb/docs/ref/env/open.html +++ /dev/null @@ -1,30 +0,0 @@ -<!--$Id: open.so,v 10.14 2000/03/18 21:43:12 bostic Exp $--> -<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.--> -<!--All rights reserved.--> -<html> -<head> -<title>Berkeley DB Reference Guide: Opening databases within the environment</title> -<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> -<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++"> -</head> -<body bgcolor=white> -<table><tr valign=top> -<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Environment</dl></h3></td> -<td width="1%"><a href="../../ref/env/remote.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/error.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p> -<h1 align=center>Opening databases within the environment</h1> -<p>Once the environment has been created, database handles may be created -and then opened within the environment. This is done by calling the -<a href="../../api_c/db_create.html">db_create</a> interface and specifying the appropriate environment -as an argument. -<p>File naming, database operations and error handling will all be done as -specified for the environment, e.g., if the <a href="../../api_c/env_open.html#DB_INIT_LOCK">DB_INIT_LOCK</a> or -<a href="../../api_c/env_open.html#DB_INIT_CDB">DB_INIT_CDB</a> flags were specified when the environment was created -or joined, database operations will automatically perform all necessary -locking operations for the application. -<table><tr><td><br></td><td width="1%"><a href="../../ref/env/remote.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/error.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font> -</body> -</html> diff --git a/bdb/docs/ref/env/region.html b/bdb/docs/ref/env/region.html deleted file mode 100644 index 0dfa19672e5..00000000000 --- a/bdb/docs/ref/env/region.html +++ /dev/null @@ -1,66 +0,0 @@ -<!--$Id: region.so,v 10.23 2000/08/09 15:45:52 sue Exp $--> -<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.--> -<!--All rights reserved.--> -<html> -<head> -<title>Berkeley DB Reference Guide: Shared Memory Regions</title> -<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> -<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++"> -</head> -<body bgcolor=white> -<table><tr valign=top> -<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Environment</dl></h3></td> -<td width="1%"><a href="../../ref/env/security.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/remote.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p> -<h1 align=center>Shared Memory Regions</h1> -<p>Each of the Berkeley DB subsystems within an environment is described by one or -more regions. The regions contain all of the per-process and per-thread -shared information, including mutexes, that comprise a Berkeley DB environment. -These regions are created in one of three areas, depending on the flags -specified to the <a href="../../api_c/env_open.html">DBENV->open</a> function: -<p><ol> -<p><li>If the <a href="../../api_c/env_open.html#DB_PRIVATE">DB_PRIVATE</a> flag is specified to <a href="../../api_c/env_open.html">DBENV->open</a>, regions -are created in per-process heap memory, i.e., memory returned by -<b>malloc</b>(3). In this case, the Berkeley DB environment may only be -accessed by a single process, although that process may be -multi-threaded. -<p><li>If the <a href="../../api_c/env_open.html#DB_SYSTEM_MEM">DB_SYSTEM_MEM</a> flag is specified to <a href="../../api_c/env_open.html">DBENV->open</a>, -regions are created in system memory. When regions are created in system -memory, the Berkeley DB environment may be accessed by both multiple processes -and multiple threads within processes. -<p>The system memory used by Berkeley DB is potentially useful past the lifetime -of any particular process. Therefore, additional cleanup may be necessary -after an application fails, as there may be no way for Berkeley DB to ensure -that system resources backing the shared memory regions are returned to -the system. -<p>The system memory that is used is architecture-dependent. For example, -on systems supporting X/Open-style shared memory interfaces, e.g., UNIX -systems, the <b>shmget</b>(2) and related System V IPC interfaces are -used. Additionally, VxWorks systems use system memory. -In these cases, an initial segment ID must be specified by the -application to ensure that applications do not overwrite each other's -database environments, and so that the number of segments created does -not grow without bound. See the <a href="../../api_c/env_set_shm_key.html">DBENV->set_shm_key</a> function for more -information. -<p><li>If no memory-related flags are specified to <a href="../../api_c/env_open.html">DBENV->open</a>, then -memory backed by the filesystem is used to store the regions. On UNIX -systems, the Berkeley DB library will use the POSIX mmap interface. If mmap is -not available, the UNIX shmget interfaces will be used, assuming they are -available. -</ol> -<p>Any files created in the filesystem to back the regions are created in -the environment home directory specified to the <a href="../../api_c/env_open.html">DBENV->open</a> call. -These files are named __db.###, e.g., __db.001, __db.002 and so on. -When region files are backed by the filesystem, one file per region is -created. When region files are backed by system memory, a single file -will still be created, as there must be a well-known name in the -filesystem so that multiple processes can locate the system shared memory -that is being used by the environment. -<p>Statistics about the shared memory regions in the environment can be -displayed using the <b>-e</b> option to the <a href="../../utility/db_stat.html">db_stat</a> utility. -<table><tr><td><br></td><td width="1%"><a href="../../ref/env/security.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/remote.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font> -</body> -</html> diff --git a/bdb/docs/ref/env/remote.html b/bdb/docs/ref/env/remote.html deleted file mode 100644 index 3cd44a539bc..00000000000 --- a/bdb/docs/ref/env/remote.html +++ /dev/null @@ -1,48 +0,0 @@ -<!--$Id: remote.so,v 11.5 2000/03/18 21:43:12 bostic Exp $--> -<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.--> -<!--All rights reserved.--> -<html> -<head> -<title>Berkeley DB Reference Guide: Remote filesystems</title> -<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> -<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++"> -</head> -<body bgcolor=white> - <a name="2"><!--meow--></a> -<table><tr valign=top> -<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Environment</dl></h3></td> -<td width="1%"><a href="../../ref/env/region.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/open.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p> -<h1 align=center>Remote filesystems</h1> -<p>When regions are backed by the filesystem, it is a common error to attempt -to create Berkeley DB environments backed by remote file systems such as the -Network File System (NFS) or the Andrew File System (AFS). Remote -filesystems rarely support mapping files into process memory, and even -more rarely support correct semantics for mutexes after the attempt -succeeds. For this reason, we strongly recommend that the database -environment directory reside in a local filesystem. -<p>For remote file systems that do allow system files to be mapped into -process memory, home directories accessed via remote file systems cannot -be used simultaneously from multiple clients. None of the commercial -remote file systems available today implement coherent, distributed shared -memory for remote-mounted files. As a result, different machines will -see different versions of these shared regions and the system behavior is -undefined. -<p>Databases, log files and temporary files may be placed on remote -filesystems, <b>as long as the remote filesystem fully supports -standard POSIX filesystem semantics</b>, although the application may incur -a performance penalty for doing so. Obviously, NFS-mounted databases -cannot be accessed from more than one Berkeley DB environment (and therefore -from more than one system), at a time since no Berkeley DB database may be -accessed from more than one Berkeley DB environment at a time. -<p><dl compact> -<p><dt>Linux note:<dd>Some Linux releases are known to not support complete semantics for the -POSIX fsync call on NFS-mounted filesystems. No Berkeley DB files should be -placed on NFS-mounted filesystems on these systems. -</dl> -<table><tr><td><br></td><td width="1%"><a href="../../ref/env/region.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/open.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font> -</body> -</html> diff --git a/bdb/docs/ref/env/security.html b/bdb/docs/ref/env/security.html deleted file mode 100644 index 84dab59b260..00000000000 --- a/bdb/docs/ref/env/security.html +++ /dev/null @@ -1,54 +0,0 @@ -<!--$Id: security.so,v 10.15 2000/05/23 21:12:06 bostic Exp $--> -<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.--> -<!--All rights reserved.--> -<html> -<head> -<title>Berkeley DB Reference Guide: Security</title> -<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit."> -<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++"> -</head> -<body bgcolor=white> - <a name="2"><!--meow--></a> -<table><tr valign=top> -<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Environment</dl></h3></td> -<td width="1%"><a href="../../ref/env/naming.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/region.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p> -<h1 align=center>Security</h1> -<p>The following are security issues that should be considered when writing -Berkeley DB applications: -<p><dl compact> -<p><dt>Database environment permissions<dd>The directory used as the Berkeley DB database environment should have its -permissions set to ensure that files in the environment are not accessible -to users without appropriate permissions. Applications which add to the -user's permissions (e.g., UNIX setuid or setgid applications), must be -carefully checked to not permit illegal use of those permissions such -as general file access in the environment directory. -<p><dt>Environment variables<dd>Setting the <a href="../../api_c/env_open.html#DB_USE_ENVIRON">DB_USE_ENVIRON</a> and <a href="../../api_c/env_open.html#DB_USE_ENVIRON_ROOT">DB_USE_ENVIRON_ROOT</a> flags -and allowing the use of environment variables during file naming can be -dangerous. Setting those flags in Berkeley DB applications with additional -permissions (e.g., UNIX setuid or setgid applications) could potentially -allow users to read and write databases to which they would not normally -have access. -<p><dt>File permissions<dd>By default, Berkeley DB always creates files readable and writeable by the owner -and the group (i.e., S_IRUSR, S_IWUSR, S_IRGRP and S_IWGRP, or octal mode -0660 on historic UNIX systems). The group ownership of created files is -based on the system and directory defaults, and is not further specified -by Berkeley DB. -<p><dt>Temporary backing files<dd>If an unnamed database is created and the cache is too small to hold the -database in memory, Berkeley DB will create a temporary physical file to enable -it to page the database to disk as needed. In this case, environment -variables such as <b>TMPDIR</b> may be used to specify the location of -that temporary file. While temporary backing files are created readable -and writeable by the owner only (i.e., S_IRUSR and S_IWUSR, or octal mode -0600 on historic UNIX systems), some filesystems may not sufficiently -protect temporary files created in random directories from improper -access. Applications storing sensitive data in unnamed databases should -use the <a href="../../api_c/env_set_tmp_dir.html">DBENV->set_tmp_dir</a> method to specify a temporary directory -with known permissions, to be absolutely safe. -</dl> -<table><tr><td><br></td><td width="1%"><a href="../../ref/env/naming.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/env/region.html"><img src="../../images/next.gif" alt="Next"></a> -</td></tr></table> -<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font> -</body> -</html> |