Using replicated functions

A replicated stored procedure is an Adaptive Server stored procedure that you’ve marked for replication using either sp_setrepproc or sp_setreplicate.

A function replication definition describes a replicated stored procedure, its parameters, and its location. When you create a function replication definition, Replication Server creates a function, which contains the information in the function replication definition.

When a replicated stored procedure that has its own function replication definition is invoked, its function is transferred from the source to a destination Replication Server. The function passes parameters to a corresponding stored procedure that is, in turn, invoked in the destination database. A function string translates the function to syntax the subscribing database can interpret.

Function replication improves performance because it encapsulates multiple operations in a single function. Replicated stored procedures do not have to modify any data in order to be replicated.