Berkeley DB: DbEnv::set_lg_filemode
Description: Berkeley DB: An embedded database programmatic toolkit.
Keywords: embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++

DbEnv::set_lg_filemode |

`

    #include <db_cxx.h>

    int
    DbEnv::set_lg_filemode(int lg_mode);

    int
    DbEnv::get_lg_filemode(int *);

Description: DbEnv::set_lg_filemode

Set the absolute file mode for created log files. This method is only useful for the rare Berkeley DB application that does not control its umask value.

Normally, if Berkeley DB applications set their umask appropriately, all processes in the application suite will have read permission on the log files created by any process in the application suite. However, if the Berkeley DB application is a library, a process using the library might set its umask to a value preventing other processes in the application suite from reading the log files it creates. In this rare case, the DbEnv::set_lg_filemode method can be used to set the mode of created log files to an absolute value.

The database environment's log file mode may also be configured using the environment's DB_CONFIG file. The syntax of the entry in that file is a single line with the string "set_lg_filemode", one or more whitespace characters, and the absolute mode of created log files. Because the DB_CONFIG file is read when the database environment is opened, it will silently overrule configuration done before that time.

The DbEnv::set_lg_filemode method configures a database environment, not only operations performed using the specified DbEnv handle.

The DbEnv::set_lg_filemode method may be called at any time during the life of the application.

The DbEnv::set_lg_filemode method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

Parameters
lg_filemode

- The lg_filemode parameter is the absolute mode of the created log file.

Description: DbEnv::set_lg_filemode

The DbEnv::set_lg_filemode method returns the log file mode.

The DbEnv::set_lg_filemode method may be called at any time during the life of the application.

The DbEnv::set_lg_filemode method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

Parameters
lg_modep

- The DbEnv::set_lg_filemode method returns the log file mode in lg_modep.

Class DbEnv, DbLogc, DbLsn
See Also Logging Subsystem and Related Methods`

Copyright (c) 1996,2008 Oracle. All rights reserved.