cdr error

The cdr error command manages the syscdrerror table and provides convenient displays of errors.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-cdr error--+--------------------------+---------------------->
              |                      (1) |   
              '-| Connect Option   |-----'   

>--+------------------------------------+----------------------><
   +- --seq=err_server:seqno------------+   
   +- --prune--"--+----------+--last--"-+   
   |              '-first--,-'          |   
   +- --zap-----------------------------+   
   | .-------------------.              |   
   | V                   |              |   
   '-----+- --follow-+---+--------------'   
         +- --all----+                      
         '- --nomark-'                      

Notes:
  1. See Connect Option.
Table 1. Elements for the cdr error command
Element Purpose Restrictions Syntax
err_server Name of database server group that holds the error table. The server must be registered for Enterprise Replication. Long Identifiers
first Start date for a range. You must provide a valid date and time. Frequency Options
last Ending date for range. You must provide a later date and time than first. Frequency Options
seqno Sequence number of a specific error. You must provide the number of an error in the error table. Integer
Table 2. Options for the cdr error command
Long Form Short Form Meaning
(no options specified)   Print the current list of errors and then mark them as reviewed. Enterprise Replication does not display errors marked as reviewed.
--all -a Print all errors, including those already reviewed.
--follow -f Continuously monitor the error table.
--nomark -n Do not mark errors as reviewed.
--prune -p Prune the error table to those times in the range from first to last. If first is omitted, then all errors earlier than last are removed.
--seq -s Remove the (single) error specified by server:seqno from the error table.
--zap -z Remove all errors from the error table.

Usage

Run the cdr error command to examine replication errors. Sometimes a command succeeds on the server on which it is run but fails on one of the remote servers. For example, if you run the cdr define replicate command on server1, but the table name is misspelled on server2, the command succeeds on server1 and seems to complete successfully. You can use cdr error -c server2 to see why replication is failing.

The cdr error command also allows you to administer the syscdrerror table remotely. The syscdrerror table on each replication server contains errors for all replication servers, unless the replication server is a leaf node. The syscdrerror tables on leaf nodes do not contain errors for other replication servers. The reviewed flag indicates which errors are new errors while keeping the old errors in the table. For example, you can run cdr error periodically and append the output to a file.

You can run this command from within an SQL statement by using the SQL administration API.

Examples

The following command shows the current list of errors on database server hill:
cdr error --connect=hill 

After the errors are shown, Enterprise Replication marks the errors as reviewed.

The following command connects to the database server lake and removes from the error table all errors that occurred before the time when the command was issued:
cdr error -c lake --zap
The following command deletes all errors from the error table that occurred at or before 2:56 in the afternoon on May 1, 2008:
cdr error -p “2008-05-01 14:56:00”
The following command deletes all errors from the error table that occurred at or after noon on May 1, 2008 and before or at 2:56 in the afternoon on May 1, 2008:
cdr error -p “2008-05-01 14:56:00,2008-05-01 12:00:00”

Copyright© 2021 HCL Technologies Limited