Creating a Function-String Class

If function strings in an existing class do not serve your needs for particular database connections, and customizing function strings in an existing class is not feasible, you can create a new class in which to create the function strings you need.

Either:
  • Create a derived class – one that inherits function strings from an existing parent class.

  • Create a base class – one that does not inherit function strings from another class.

  1. Create the function-string class with create function string class.
    Use the appropriate syntax to either:
    • Create a derived class, or

    • Create a base class.

    The name of the new class must conform to the rules for identifiers. See Replication Server Reference Manual > Topics > Identifiers.

  2. Create function strings for the new class with create function string.
    • If you are creating a derived class, you need to create only the function strings that you want to override and inherit all others from the specified parent class.

    • The class rs_default_function_class, which is a system-provided class, does not contain default function strings for the rs_dumpdb and rs_dumptran functions. If you require them in a derived class that inherits from rs_default_function_class, you must create them.

    • If you are creating a base class, you must create all the necessary function strings for the class.

  3. If you are preparing a new function-string class for an existing database connection, you must suspend the connection before you can use the new class.
    See Replication Server Administration Guide Volume 1 > Manage Database Connections > Altering Database Connections > Suspend Database Connections.
  4. Create or alter the database connection to assign the new class.
  5. If you altered an existing database connection to use the new class, resume the connection.
    See Replication Server Administration Guide Volume 1 > Manage Database Connections > Altering Database Connections > Suspend Database Connections.
Related concepts
Function-String Inheritance
Create a Derived Class
Create a Base Class
Create Function Strings
System-Provided Classes
Assign a Function-String Class to a Database