Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Replicate does filtering of transactions based on TRANSACTION_NAME which contains "DBREPL_database_name_XID". 

Mine prevention throws them out on mine and it throws out all of them.
Apply loop prevention throws them out on apply - if td database name matches current database (=they just completed a loop).

 

APPLY_LOOP_PREVENTION ( YES on default)

Purpose:  

  •  Changes that are mined on the source server and then applied on the target server are not mined again on the target server. This is prevented by the APPLY_LOOP_PREVENTION setting.
  • Based on TRANSACTION_NAME the APPLY_LOOP_PREVENTION throws transaction out on

...

  • APPLY - if the database name matches current database

...

  • meaning it just completed a loop

...

  • .

...

  • It also checks if the DDL was done by an apply process on this db; modify the DDL by adding comment to the end so next mine/apply can check that it was done by apply.

Valid Settings: YES or NO



MINE_LOOP_PREVENTION ( NO on default)

Purpose:  

  • Changes that are mined on the source server and then applied on the target server. This is controlled by the MINE_LOOP_PREVENTION setting.
  • MINE_LOOP_PREVENTION throws out transaction based on the TRANSACTION_NAME that contains "DBREPL_database_name_XID". 

                 If set to YES it checks if we Replicate does skip this DDL due to to: 

    • it is created by an APPLY process and apply and APPLY adds a comment to end of the DDL .

This is disabled -

...

Replicate need to pass at least CREATE TABLE to

...

APPLY;

...

it just lets APPLY_LOOP_PREVENTION do it's job for DDL

    • an established isolation level triggered by a SET TRANSACTION statement

...

If both APPLY_LOOP_PREVENTION and MINE_LOOP_PREVENTION are disabled APPLY will not set/use transaction name 'DBREPL_%'.



USE CASES:

One-To-One Replication:

Bi-direction (or 2-way):  replication is possible allowing master-to-master replication to provide real time information across multiple applications and sites. 

One-way replication is possible allowing real time reporting across distributed reader farms reducing the performance impact on the production databases.

 

One-To-Many:

One-On-One:

One-On-One-Back: