Library Version 12.1.6.2

DbSite::remove()
Prev | Chapter 11. Replication Methods | Next

## DbSite::remove()

    #include <db_cxx.h>

    int
    DbSite::remove();

The `DbSite::remove()` method removes the site from the replication group. If called at the master site, Replication Manager updates the group membership database directly. If called from a client, this method causes a request to be sent to the master to perform the operation. The method then awaits confirmation.

The DbSite handle must not be accessed again after this method is called, regardless of the return value. This method may not be called before starting Replication Manager.

The `DbSite::remove()` 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.

### Errors

The `DbSite::remove()` method may fail and throw a DbException exception, encapsulating one of the following non-zero errors, or return one of the following non-zero errors:

#### DB_REP_UNAVAIL

The master updated the group membership database but did not receive enough acknowledgements from clients to meet the current acknowledgement policy or there was an attempt to remove the current master site from the replication group.

#### EINVAL

If Replication Manager has not been started.

### Class

DbSite

### See Also

Replication and Related Methods

Prev | Up | Next
DbSite::get_eid() | Home | DbSite::set_config()