Creating or modifying a function string for a replicated function

When you create or alter a function replication definition, Replication Server automatically creates or alters the corresponding user-defined function. You must, however, create a function string for the user-defined function if you are not using a class that inherits function strings from rs_default_function_class, either directly or indirectly.

See “User-defined functions” for more information.

Create a function string for a user-defined function in the function-string class assigned to the destination database for the replicated function. Use create function string at the primary Replication Server to create a function string for a user-defined function.

See “Function strings and function-string classes” for more information.

When you drop a function replication definition, Replication Server always drops the user-defined function and function strings.

You can customize function strings in function-string classes that allow it. In a typical application, the replicated user-defined function passes stored procedure parameter values to the destination Replication Server, and the function string runs the stored procedure with these values in the destination database.

To change the default function string to perform some other action, such as inserting data into an audit log, use the alter function string command at the primary Replication Server for the replicated function. The function-string class assigned to the destination database for the replicated function must allow you to customize function strings.

See Chapter 2, “Customizing Database Operations” for information on creating and altering function strings. See also Chapter 3, “Replication Server Commands,” in the Replication Server Reference Manual, for more information about the create function string command.