Create an Error Class

Use create error class to create your own error classes.

An error class is a name used to group error action assignments. create error class copies the error actions from the template error class to the new error class.

You can define a single error class to use with all databases managed by the same type of data server. For example, you can use the default Adaptive Server error class, rs_sqlserver_error_class, with any Adaptive Server database. There is no need to create another error class unless a database has special error-handling requirements.

Note: When you create a connection using a connection profile, the error class is assigned by the connection profile. The connection profile predefines the error class for a specific data server. See Replication Server Administration Guide Volume 1 > Manage Database Connections > Prepare Databases for Replication > Prepare Non-ASE Servers for Replication > Connection Profiles.
To create an error class, enter:
create [replication server] error class error_class
[set template to template_error_class]
The replication server option specifies that you want to create a Replication Server error class. You can use the set template to option, and another error class as a template to create an error class.

Examples

This example creates an error class named pubs2_error_class without a template error class:
create error class pubs2_error_class
This example 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
This example creates the my_error_class error class for an Oracle database based on rs_oracle_error_class as a template:
create error class my_error_class
set template to rs_oracle_error_class