Assigns Replication Server error-handling actions to data server or Replication Server errors received by the DSI thread based on error number or severity.
assign action {ignore | warn | retry_forever | retry_log | log | retry_stop | stop_replication} for <error_class > to {<server_error1>[, <server_error2>]...|severity <severity>}
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 retry the command forever until the assigned error action is fixed. You can assign an error action to retry_forever with alter connection. If no error action is assigned, by default, when the error severity is 17, an error message is displayed.
DSI encountered error 1105 with Severity 17. It is mapped to RETRY_FOREVER. DSI will retry the transaction until the error is fixed.
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 or Replication Server error number.
The error severities for ASE.
Severity value |
Description |
---|---|
10 |
Non-fatal error. These are strictly information messages; that is, no error at all. |
11-16 |
Non-fatal error. These are caused by user errors, and can always be corrected by the user. |
17-18 |
Non-fatal error. Notify system administrator. The cause of the error may not be entirely within the user's control. The errors should be reported to the system administrator who may be able to reconfigure or tweak SQL Server to rectify the error. |
19-24 |
Fatal error. Notify system administrator. These errors are generated when SQL Server detects any fatal problem. |
25 |
Used internally by SQL Server to facilitate "longjumps". Client applications do not see this severity level. |
26 |
Fatal error. Notify system administrator. It is generated when SQL Server detects that one of the many multi-processor synchronization rules has been violated. |
Instructs Replication Server to ignore data server errors 5701 and 5703:
assign action ignore for pubs2_db_err_class to 5701, 5703
assign action warn for rs_repserver_error_class to 5186
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."
assign action retry_forever for rs_repserver_error_class to 1105
assign action ignore for rs_sqlserver_error_class to severity 10
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 a data server error has no action assigned, the default action stop_replication is taken. For Replication Server errors, the default action taken depends on the type of error that occurred. See Updates to Replication Server error class error numbers for a list of supported Replication Server errors and the default actions for these errors.
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 the qualifying sites through the replication system. These changes do not appear immediately due to the normal replication system lag time.
The action defined for an error number takes precedent over its severity. If an error number has no defined action, the action defined for its severity will be effective.
Use rs_helpseverity to find the actions for each severity.
Error Actions with Multiple Errors
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_forever
4. retry_log
5. log
6. retry_stop
7. stop_replication
Error Actions for <rs_sqlserver_error_class>
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.
Error Actions for <rs_repserver_error_class>
Predefined error actions for Replication Server are provided with the rs_repserver_error_class error class.
To assign different error actions to the rs_repserver_error_class, you must first choose a primary site for the error class. Log in to the Replication Server at the primary site and create the error class using create replication server error class.
"Updates to Replication Server Error Class Error Numbers" table lists the valid Replication Server errors and their default error actions.
server_error |
Error Message |
Default Error Action |
Description |
---|---|---|---|
5185 |
Row count mismatch for the command executed on ‘<dataserver.database>’. The command impacted <x> rows but it should impact <y> rows. |
stop_replication |
This message appears if the affected number of rows is different from the expected number of rows, after a command that is not part of SQL Statement Replication, or a stored procedure, or a row change with autocorrection enabled is sent to the data server. |
5186 |
Row count mismatch for the command executed on ‘<dataserver.database>’. The command impacted <x> rows but it should impact <y> rows. |
stop_replication |
Row count verification error for SQL statement replication if the affected number of rows is different from what is expected. |
5187 |
Row count mismatch for the autocorrection delete command executed on ‘<dataserver.database>'. The command deleted <x> rows but it should delete <y> rows. |
stop_replication |
This message appears if the affected number of rows is different from the expected number of rows, after a delete command is sent to the data server, and if autocorrection is enabled. |
5193 |
You cannot enable auto correction if SQL Statement Replication is enabled. Either enable SQL Statement Replication only or disable SQL StatementReplication before you enable autocorrection. |
stop_replication |
Cannot enable autocorrection if SQL statement replication is enabled. Either enable SQL statement replication only or disable SQL statement replication before you enable autocorrection |
5203 |
Row count mismatch on ‘<dataserver.database>’. The delete command generated by dsi_command_convert deleted <x> rows, whereas it should delete <y> rows. |
stop_replication |
This message appears if the number of rows deleted is different from the expected number of rows to be deleted. |
For information about rs_repserver_error_class see "Error and Function Classes" table.
Displaying Error Actions
The rs_helperror stored procedure displays the Replication Server error actions mapped to a given data server error number.