solidDB Help : solidDB reference : SQL: Statements : SET : SET SYNC : SET SYNC {MASTER | REPLICA}
  
SET SYNC {MASTER | REPLICA}
Note Applies to only solidDB Advanced Replication configurations.
SET SYNC {MASTER | REPLICA} {YES | NO}
Access requirements
In master: SYS_ADMIN_ROLE or SYS_SYNC_ADMIN_ROLE role
In replica: SYS_SYNC_ADMIN_ROLE role
Usage
When a database is created and configured for synchronization use, use the SET SYNC {MASTER | REPLICA} statement to specify whether the database is a master database, replica database, or both.
A database is a master database if there are replica databases in the domain that refresh from publications in the database or propagate transactions to the database.
A database is a replica database if the database can refresh from publications that are in a master database.
In multi-tier synchronization, intermediate level databases serve a dual role, as both master and replica databases.
Before you can use the SET SYNC {MASTER | REPLICA} statement, you must set the node name for the master or replica database by using the SET SYNC NODE statement, see SET SYNC NODE.
When you set the database for a dual role, you use the statement two times. For example:
SET SYNC MASTER YES;
SET SYNC REPLICA YES;
Note When you set a database for dual roles, SET SYNC REPLICA YES does not override SET SYNC MASTER YES.
To remove the master status from a database, use the following statement:
SET SYNC MASTER NO;
When the status is overridden, the current database is set as replica only.
Return values
For details on each error code, see Error codes.
 
Error code
Description
13047
No privilege for operation
13107
Illegal set operation
13133
Not a valid license for this product
25051
Unfinished messages found
Examples
-- configure as replica
SET SYNC REPLICA YES;
-- configure as master
SET SYNC MASTER YES;
Go up to
SET SYNC