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
Creates the my_error_class error class based on rs_oracle_error_class:
create error class my_error_class set template to rs_oracle_error_class
Creates a new Replication Server error class named pubs2_rs_err_class:
create replication server error class pubs2_rs_err_class
Creates the my_rs_err_class Replication Server error class based on rs_repserver_error_class, which is the default Replication Server error 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.
This command has the following requirements:
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.
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.
Use drop error class to remove an error class and any actions associated with it.
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-Adaptive Server replicate server, Replication Server verifies if the option to return native error codes from the non-Adaptive Server 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.
For a list of non-Adaptive Server error classes, see Table 3-23. For more information about non-Adaptive Server replication error classes, see the Replication Server Administration Guide Volume 1.
create error class requires “sa” permission.
alter connection, alter error class, assign action, create connection, drop error class, rs_init_erroractions