Library Version 11.2.5.3

Enabling Replication in the SQL Layer
Prev | Chapter 10. Upgrading Berkeley DB 11.2.5.1 applications to Berkeley DB 11.2.5.2 | Next

## Enabling Replication in the SQL Layer

Replication can now be enabled and configured in the SQL layer using pragmas. The pragmas `replication_local_site`, `replication_initial_master`, and `replication_remote_site` can be used to configure the replication group. Note that when the BDB SQL replicated application is initially started, a specific master site must be explicitly designated. After configuring the replication group, start replication using `PRAGMA replication=ON`.

To display replication statistics in the dbsql shell, use:

    dbsql> .stat :rep

### New Pragmas

For more details on the replication pragmas see Replication PRAGMAs in the Berkeley DB Getting Started with the SQL APIs guide.

- `PRAGMA replication=ON|OFF`
- `PRAGMA replication_initial_master=ON|OFF`
- `PRAGMA replication_local_site="hostname:port"`
- `PRAGMA replication_remote_site="hostname:port"`
- `PRAGMA replication_remove_site="host:port"`
- `PRAGMA replication_verbose_output=ON|OFF`
- `PRAGMA replication_verbose_file=filename`

Prev | Up | Next
2SITE_STRICT Enabled by Default in Replication | Home | Repmgr Message Channels