create error class

Creates an error class.

Syntax

create [replication server] error class error_class
    [set template to template_error_class]

Parameters

Examples

Usage

  • 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.

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.

Permissions

create error class requires “sa” permission.

Related reference
alter connection
alter error class
assign action
create connection
drop error class
move primary
rs_init_erroractions