Creates an error class.
create [replication server] error class <error_class> [set template to <template_error_class>]
Indicates that the new error class is a Replication Server error class and not a data server error class.
The name for the new error class. The name must be unique in the replication system and must conform to the rules for identifiers.
A Replication Server error class and a data server error class cannot share the same name.
Use this clause to create an error class based on another error class. create error class copies the error actions from the template error class to the new error class.
This example creates a new error class named <pubs2_db_err_class>:
create error class pubs2_db_err_class
create error class my_error_class set template to rs_oracle_error_class
create replication server error class pubs2_rs_err_class
create replication server error class my_rs_err_class set template to rs_repserver_error_class
Use create error class to create an error class. An error class is a name used to group error action assignments for a database.
Routes must exist from the Replication Server where an error class is created to the Replication Servers managing data servers that are to use the error class.
The <rs_sqlserver_error_class> is the default error class provided for Adaptive Server databases while the <rs_repserver_error_class> is the default error class provided for Replication Server. Initially, these two error classes do not have a primary site. You must create these error classes at a primary site before you can change the default error actions.
After using create error class, use the rs_init_erroractions stored procedure to initialize the error class.
Associate an error class with a database using create connection or alter connection. Each database can have one error class. An error class can be associated with multiple databases.
Replication Server distributes the new error class to qualifying sites through out the replication system. The changes do not appear immediately at all such sites because of normal replication system lag time.
Assigning Error Actions
Use assign action to change the Replication Server response to specific data server errors. Actions are assigned at the Replication Server where the error class is created.
Dropping Error Classes
Use drop error class to remove an error class and any actions associated with it.
Non-Adaptive Server Error Classes
You can assign non-Adaptive Server error classes to specific connections on non-Adaptive Server replication databases using the create connection and alter connection commands.
When Replication Server establishes a connection to a non-ASE replicate server, Replication Server verifies if the option to return native error codes from the non-ASE replicate server is enabled for the connection. If the option is not enabled, Replication Server logs a warning message that the connection works but error action mapping may not be correct.
See “ReturnNativeError,” in the Replication Server Options documentation to set the option in the Enterprise Connect™ Data Access (ECDA) Option for ODBC for your replicate server.
For a list of non-Adaptive Server error classes, see Error and Function Classes table. For more information about non-Adaptive Server replication error classes, see the Replication Server Administration Guide Volume 1.
create error class requires “sa” permission.