DbEnv::repmgr_add_remote_site

API Ref

#include <db_cxx.h>

int DbEnv::repmgr_add_remote_site(const char *host, u_int port, int *eidp, u_int32_t flags);


Description: DbEnv::repmgr_add_remote_site

The DbEnv::repmgr_add_remote_site method adds a new replication site to the replication manager's list of known sites. It is not necessary for all sites in a replication group to know about all other sites in the group.

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

The DbEnv::repmgr_add_remote_site 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

eidp
If eidp is non-NULL, the environment ID assigned to the remote site is returned in the memory location referenced by eidp.
flags
The flags parameter must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:
DB_REPMGR_PEER
Specifying the DB_REPMGR_PEER flag configures client-to-client synchronization with the specified remote site.

Currently, the replication manager framework only supports a single client peer, and the last specified peer is used.

host
The site's host identification string, generally a TCP/IP host name.
port
The port number on which the remote site is receiving.

Class

DbEnv

See Also

Replication and Related Methods

APIRef

Copyright (c) 1996-2006 Oracle Corporation - All rights reserved.