Assigns Replication Server error-handling actions to data server errors received by the DSI thread.
assign action {ignore | warn | retry_log | log | retry_stop | stop_replication} for error_class to data_server_error [, data_server_error]...
Instructs Replication Server to ignore the error and continue processing. ignore should be used when the data server error code indicates a successful execution or an inconsequential warning.
Instructs Replication Server to display a warning message in its log file without rolling back the transaction or interrupting execution.
Instructs Replication Server to roll back the transaction and retry it. The number of retry attempts is set with alter connection. If the error continues after retrying, Replication Server writes the transaction in the exceptions log and executes the next transaction.
Instructs Replication Server to roll back the current transaction, log it in the exceptions log, and then execute the next transaction.
Instructs Replication Server to roll back the transaction and retry it. The number of retry attempts is set with the alter connection. If the error continues after retrying, Replication Server suspends replication for the database.
Instructs Replication Server to roll back the current transaction and suspend replication for the database. This action is equivalent to using suspend connection.
The error class name for which the action is being assigned.
A data server error number.
Instructs Replication Server to ignore data server errors 5701 and 5703:
assign action ignore for pubs2_db_err_class to 5701, 5703
Use assign action to tell Replication Server how to handle errors returned by data servers. This command overrides any action previously assigned to a data server error.
Execute assign action at the primary site where the create error class was executed.
Assign actions for an error class before you create any distributions that use the error class. Assigning actions for an active distribution can lead to unpredictable results.
If an error has no action assigned, the default action stop_replication is taken.
Be sure to assign error actions that are appropriate for the error condition. For example, if you assign the ignore action to an error returned by the data server when a begin transaction command fails, the subsequent commit or rollback command may generate an unexpected error.
Data servers return errors to Replication Server through the Client/Server Interfaces error-handling mechanism. Warnings and error messages are written to the Replication Server log file.
Replication Server distributes error actions to qualifying sites through the replication system. The changes do not appear immediately because of normal replication system lag time.
When an operation results in multiple errors, Replication Server chooses the most severe action to perform for the set of errors. For example, if one error indicates that a transaction has been rolled back and is assigned the retry_log action, and another error indicates that the transaction log is full and is assigned the stop_replication action, a transaction that returns both errors causes Replication Server to perform the stop_replication action. The severity of the error actions, from least severe to most severe, are as follows:
1. ignore
2. warn
3. retry_log
4. log
5. retry_stop
6. stop_replication
Predefined error actions for Adaptive Servers are provided with the rs_sqlserver_error_class error class.
To assign different error actions in the rs_sqlserver_error_class, you must first choose a primary site for the error class. Log into the Replication Server at that site and create the error class using create error class.
The rs_helperror stored procedure displays the Replication Server error actions mapped to a given data server error number.
assign action requires "sa" permission.
configure connection, create connection, create error class, drop error class, rs_helperror, suspend connection