Assign Actions to Data Server Errors

Use the assign action command to specify the action to take for errors that a data server can return to Replication Server.

assign action
  {ignore | warn | retry_log | log | retry_stop | stop_replication}
  for error_class
  to server_error1 [, server_error2]...

You must create a default error class at a primary site before you can use assign action to change default error actions. The data_server_error parameter is the data server error number.

You can assign error classes to specific connections on replication databases using create connection and alter connection.

Enter one of the six possible error actions at the Replication Server where the error class was created: ignore is the least severe action and stop_replication is the most severe. See Replication Server Reference Manual > Replication Server Commands > assign action for error numbers, error messages, corresponding default error actions, and descriptions.

When a transaction causes multiple errors, Replication Server chooses just one action—the most severe action assigned to any of the errors that occurred. To return an error to the default error action, stop_replication, you must reassign it explicitly.

You can also specify how Replication Server responds to SQLDML row count errors that may occur during SQL statement replication. In SQLDML row count errors, the number of rows changed in the primary and replicate databases do not match after SQL statement replication. The Replication Server default error action is to stop replication. The default Replication Server error class is rs_repserver_error_class.

This is an example of a row count error message:
DSI_SQLDML_ROW_COUNT_INVALID 5186
Row count mismatch for the SQL Statement Replication
command executed on 'mydataserver.mydatabase'. The
command impacted 10 rows but it should impact 15 rows.

Examples of Assigning an Error Action

For example, to instruct Replication Server to ignore Adaptive Server errors 5701 and 5703:
assign action ignore
 for rs_sqlserver_error_class
 to 5701, 5703
For example, to warn if Replication Server encounters row count errors, which is indicated by error number 5186:
assign action warn 
   for rs_repserver_error_class to 5186
Related reference
Error Actions for Data Server Errors
Default Error Classes