Active - Active or 2-way replication is very similar to 1-way replication. This is used when changes can be made to both databases and they both must be kept in sync.
It can be viewed as 2 x 1-way replication, with an outer (1-way) loop and an inner (1-way) loop as seen in the following diagram:
The differences between 1-way replication and 2-way replication are:
...
Active - Active or 2-way replication is very similar to 1-way replication. This is used when changes can be made to both databases and they both must be kept in sync.
It can be viewed as 2 x 1-way replication, with an outer (1-way) loop and an inner (1-way) loop as seen in the following diagram:
The differences between 1-way replication and 2-way replication are:
- There is a Mine and Apply processes running on each server. With 1-way replication there is only an Apply OR a Mine process running on each server.
- Changes that are mined on the source server and then applied on the target server are not mined again on the target server. This prevents the feedback loop.
- The Mine and Apply processes are paired together. So in a typical 2-way replication there are the following 2-pairs:
...
Section | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
With 2-
...
With 2-way replication the table listing in the console can so long that the prompt cannot be seen. By default, 30 tables are listed for each replication, thus for a 2-way replication, it takes up to 70 screen lines.
To change this, edit the *-MINE.ddc file and add line "set STATUS_BAR_ACTIVE_TABLES 5". Or enter this command at the console prompt. Restart the console for this change to take affectway replication the table listing in the console can so long that the prompt cannot be seen. By default, 30 tables are listed for each replication, thus for a 2-way replication, it takes up to 70 screen lines.
To change this, edit the *-MINE.ddc file and add line "set STATUS_BAR_ACTIVE_TABLES 5". Or enter this command at the console prompt. Restart the console for this change to take affect.
CHOOSE REPLICATION
By default all commands in the Dbvisit Replicate console work with the default processes MINE and APPLY. This choose replication command is useful when working with 2-way replication where there are multiple processes such as MINE, APPLY, MINE1 and APPLY1.
Note that the CHOOSE REPLICATION command selects all processes for the indicated replication (so both Mine and Apply processes).
Example:
Panel | ||
---|---|---|
| ||
dbvrep> CHOOSE REPLICATION MINE1 |
The above command will choose the replication pair that is associated with MINE1. Typically this is MINE1->APPLY1.
Note that the CHOOSE REPLICATION command is needed prior to issuing commands to display, resolve and set conflicts with the APPLY1 process.