DbEnv::repmgr_start API Ref

#include <db_cxx.h>

int DbEnv::repmgr_start(int nthreads, u_int32_t flags);


Description: DbEnv::repmgr_start

The DbEnv::repmgr_start method starts the replication manager.

There are two ways to build Berkeley DB replication applications: the most common approach is to use the Berkeley DB library "replication manager" support, where the Berkeley DB library manages the replication group, including network transport, all replication message processing and acknowledgment, and group elections. Applications using the replication manager support generally make the following calls:

  1. Call DbEnv::repmgr_set_local_site to configure the local site in the replication group.

  2. Call DbEnv::repmgr_add_remote_site to configure the remote site(s) in the replication group.

  3. Call DbEnv::repmgr_set_ack_policy to configure the message acknowledgment policy which provides the replication group's transactional needs.

  4. Call DbEnv::rep_set_priority to configure the local site's election priority.

  5. Call DbEnv::repmgr_start to start the replication application.

For more information on building replication manager applications, please see the "Replication Manager Getting Started Guide" included in the Berkeley DB documentation.

Applications with special needs (for example, applications using network protocols not supported by the Berkeley DB replication manager), must perform additional configuration and call other Berkeley DB replication methods. For more information on building advanced replication applications, please see the "Advanced Replication Applications Guide" included in the Berkeley DB documentation.

The DbEnv::repmgr_start method may not be called before the DbEnv::open method is called.

The DbEnv::repmgr_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
flags nthreads


Class DbEnv
See Also Replication and Related Methods

APIRef

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