In Replication Server 15.2, you can specify how Replication Server responds to SQLDML row count errors that may occur during SQL statement replication. SQLDML row count errors occur when the number of rows changed in the primary and replicate databases do not match after SQL statement replication. The default error action is to stop replication.
Use the assign action command at the primary site for the Replication Server error class to specify other error actions for SQLDML row count errors:
assign action {ignore | warn | retry_log | log | retry_stop | stop_replication} for error_class to server_error1 [, server_error2]...
error_class is the error class name for which the action is being assigned. With Replication Server 15.2, you can specify Replication Server error classes such as the default rs_repserver_error_class error class.
server_error is the error number. With Replication Server 15.2, you can specify error numbers for Replication Server:
server_error |
Description |
Default error action |
---|---|---|
5186 |
Row count verification error for SQL statement replication if the affected number of rows is different from what is expected. |
stop_replication |
5193 |
Cannot enable autocorrection if SQL statement replication is enabled. Either enable SQL statement replication only or disable SQL statement replication before you enable autocorrection. |
stop_replication |
To execute the assign action command using the rs_repserver_error_class to stop replication if Replication Server encounters error number 5186, enter:
assign action stop_replication for rs_repserver_error_class to 5186
If there is a row count error, this is an example of the error message that displays:
DSI_SQLDML_ROW_COUNT_INVALID 5186 Row count mismatch for SQLDML command executed on 'mydataserver.mydatabase'. The command impacted 1000 rows but it should impact 1500 rows.