cdr error
The cdr error command manages the syscdrerror table and provides convenient displays of errors.
Syntax
>>-cdr error--+--------------------------+----------------------> | (1) | '-| Connect Option |-----' >--+------------------------------------+---------------------->< +- --seq=err_server:seqno------------+ +- --prune--"--+----------+--last--"-+ | '-first--,-' | +- --zap-----------------------------+ | .-------------------. | | V | | '-----+- --follow-+---+--------------' +- --all----+ '- --nomark-'
- See Connect Option.
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 |
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
cdr error --connect=hill
After the errors are shown, Enterprise Replication marks the errors as reviewed.
cdr error -c lake --zap
cdr error -p “2008-05-01 14:56:00”
cdr error -p “2008-05-01 14:56:00,2008-05-01 12:00:00”