The following is an example of a three-primary node system using an MMR-ready sequence. The databases to use as the primary nodes are MMRnode_a, MMRnode_b, and MMRnode_c. A publication table named MMR_seq_tbl uses the MMR-ready sequence.
The following commands are invoked in database MMRnode_a, which is the primary definition node:
On MMRnode_b and MMRnode_c, run the commands to create different settings for the configuration parameter cluster.unique_db_id are run and the commands to create the sequence and the functions.
On MMRnode_b, invoke the following commands.
Note
Cluster.unique_db_id is set to 2.
On MMRnode_c, invoke the following commands.
Note
The cluster.unique_db_id is set to 3.
Create the multi-master replication system with the Replicate Publication Schema and the Perform Initial Snapshot options selected when creating the additional primary nodes MMRnode_b and MMRnode_c.
The resulting primary nodes are shown in the Replication Server console.
Note
The Default Value property of the id column uses the MMR_sequence_nextval function.
Invoke the following INSERT commands on MMRnode_a:
Invoke the following INSERT on MMRnode_b:
Invoke the following INSERT on MMRnode_c:
A synchronization replication is performed.
No uniqueness conflicts occur. A unique value is generated for the id primary key column as shown by the following results on MMRnode_a:
The same query on MMRnode_b shows the same set of rows: