The assign action command specifies the action to take for errors that a data server can return to Replication Server. The syntax for the assign action command is:
assign action {ignore | warn | retry_log | log | retry_stop | stop_replication} for error_class to data_server_error [, data_server_error]...
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
The default error class provided for Adaptive Server databases is rs_sqlserver_error_class. You must create this error class at a primary site before you can use the assign action command to change default error actions. The data_server_error parameter is the data server error number.
Enter one of the six possible error actions at the Replication Server where the error class was created. These actions are listed in Table 6-3, in order of severity: ignore is the least severe action and stop_replication is the most severe.
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.
Action |
Description |
---|---|
ignore |
Assume that the command succeeded and that there is no error or warning condition to process. This action can be used for a return status that indicates successful execution. |
warn |
Log a warning message, but do not roll back the transaction or interrupt execution. |
retry_log |
Roll back the transaction and retry it. The number of retry attempts is set with the configure connection command. If the error continues after retrying, write the transaction into the exceptions log, and continue, executing the next transaction. |
log |
Roll back the current transaction and log it in the exceptions log; then continue, executing the next transaction. |
retry_stop |
Roll back the transaction and retry it. The number of retry attempts is set with the configure connection command. If the error recurs after retrying, suspend replication for the database. |
stop_replication |
Roll back the current transaction and suspend replication for the database. This is equivalent to using the suspend connection command. This action is the default. Since this action stops all replication activity for the database, it is important to identify the data server errors that can be handled without shutting down the database connection, and assign them to another action. |