DbEnv::rep_start API Ref

#include <db_cxx.h>

int DbEnv::rep_start(Dbt *cdata, u_int32_t flags);


Description: DbEnv::rep_start

The DbEnv::rep_start method configures the database environment as a client or master in a group of replicated database environments.

The DbEnv::rep_start method is not called by most replication applications. It should only be called by applications implementing their own network transport layer, explicitly holding replication group elections and handling replication messages outside of the replication manager framework.

Replication master environments are the only database environments where replicated databases may be modified. Replication client environments are read-only as long as they are clients. Replication client environments may be upgraded to be replication master environments in the case that the current master fails or there is no master present.

The enclosing database environment must already have been opened by calling the DbEnv::open method and must already have been configured to send replication messages by calling the DbEnv::rep_set_transport method.

The DbEnv::rep_start 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
cdata flags

Errors

The DbEnv::rep_start method may fail and throw DbException, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:


EINVAL


Class DbEnv
See Also Replication and Related Methods

APIRef

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