Is it possible to run a single compare/repair command to fix out of sync on a target table on all targets?
In Shareplex versions lower than 7.6, it is not possible. The following syntax (using old compare repair command) only allows one target to be specified:
sp_ctrl>compare owner.source_table to owner.target_table target target_server@o.targetSID repair
In Shareplex versions 7.6 or higher, it is possible. In these versions the new compare or repair syntax allows specifying the source table without specifying other options like target table, target route, etc. With this type of command specification, the compare or repair will operate on target table on all targets by referencing the active config file to determine target table name and the respective targets to which this table is replicating. Here is syntax to specify only the source table:
sp_ctrl>compare owner.source_table
OR
sp_ctrl>repair owner.source_table
The syntax specified above is for full table compare (or repair) and most other options are omitted for the sake of simple illustration.
The new syntax comes handy when one wants to avoid having to issue multiple compare to fix target table on more than one target. This is especially true when the table has tens of millions rows and each compare can take hours.
If the table is replicating to multiple targets and if wishing to fix the out of sync on only one target, the following option needs to be specified as otherwise the compare or repair will work on target tables in all targets:
sp_ctrl>compare owner.source_table at target_host@o.target_sid
OR
sp_ctrl>repair owner.source_table at target_host@o.target_sid
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center