Home | Previous Page | Next Page   Appendix A. Command-Line Utility Reference > 4 4 4

cdr check replicateset

4
The cdr check replicateset command compares 4the data on replication servers to create a report listing data inconsistencies 4and can optionally repair the inconsistent data within a replicate. 4
4

Syntax

4
4
Read syntax diagramSkip visual syntax diagram4>>-cdr check replicateset--+-------------------------+---------->
4                           |                    (1)  |
4                           '-| Connect Option |------'
4 
4>-- --master=data_server-- --replset=repl_name------------------>
4 
4     .---------------.
4     V               |
4>--+---target_server-+-+--+------------+------------------------>
4   '- --all------------'  '- --verbose-'
4 
4>--+------------------------------------------------+----------><
4   '- --repair--+---------------------------------+-'
4                '- --extratargetrows=--+-delete-+-'
4                                       +-keep---+
4                                       '-merge--'
4 
4 4 4
Notes:
4
    4
  1. See page Connect Option.
  2. 4
4 444444444444444444444444444444
Element Purpose Restrictions Syntax
data_server Name of the database server to use as the reference copy 4of the data Must be the name of an existing database server group in 4SQLHOSTS. See Setting up Database Server 4Groups. Long Identifiers
repl_set Name of the replicate set to synchronize Long Identifiers
target_server Name of a database server group to check Must be the name of an existing database server group in 4SQLHOSTS. See Setting up Database Server 4Groups. Long Identifiers
4

The following table describes the cdr check replicateset options.

4 44444444444444444444444444444444444444444
Long Form Short Form Meaning
--all -a Specifies that all servers defined for the replicate are 4checked
--extratargetrows= -e Specifies how to handle rows found on the target servers 4that are not present on the server from which the data is being copied (data_server): 4
    4
  • delete: (default) remove rows and dependent rows, 4based on referential integrity constraints, from the target servers
  • 4
  • keep: retain rows on the target servers
  • 4
  • merge: retain rows on the target servers and replicate 4them to the data source server
--master -m Specifies the database server to use as the reference copy 4of the data
--repair -R Specifies that rows that are found to be inconsistent are 4repaired
--replset -s Specifies the name of the replicate set to check
--verbose -v Specifies that the consistency report shows specific rows 4that are inconsistent instead of a summary of inconsistent rows
4
4

Usage

4
4

Use the cdr check replicateset command to check the 4consistency of data between multiple database servers for a replicate set. 4The cdr check replicateset command compares all rows 4on all specified database servers against the data in the reference server 4and produces a consistency report. If you include the –verbose option, the report lists every inconsistent row; otherwise, the report 4summarizes inconsistent rows. If you include the –repair option, the cdr check replicateset command repairs 4inconsistent rows so that they match the rows on the reference server. During 4a repair of inconsistent rows, the cdr check replicateset command uses direct synchronization as a foreground process.

4

The cdr check replicateset command requires that 4its associated user-defined routines are installed and registered in 4each database that is involved in the checking process. For instructions about 4installing and registering these routines, see Preparing the checksum 4Support Functions.

4
4

Examples

4
4

The following command generates a consistency report for a replicate set 4named replset1, comparing the data on the server serv2 with the data on the server serv1:

4
cdr check replicateset --master g_serv1 --replset=replset_1 g_serv2
4

The summary consistency report for the previous command might be:

4
------   Statistics for repl1 ------
4Node                  Rows     Extra   Missing  Mismatch Processed
4---------------- --------- --------- --------- --------- ---------
4g_serv1                 52         0         0         0         0
4g_serv2                 52         0         0         0         0
4
4------   Statistics for repl2 ------
4Node                  Rows     Extra   Missing  Mismatch Processed
4---------------- --------- --------- --------- --------- ---------
4g_serv1                 48         0         0         0         0
4g_serv2                 48         0         0         0         0
4

This report indicates that the replicate set is consistent on these servers.

4

The consistency report for replicate sets shows a series of consistency 4reports for individual replicates. For more examples of consistency reports 4and a description of the report, see the examples in cdr check replicate.

4
4

See Also

4
4 4
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]