A function replication definition describes a replicated stored procedure and includes:
The parameters and datatypes
The location of the primary data that the stored procedure may modify
Parameters that can be used in subscribing to stored-procedure executions
The name of the stored procedure to execute at the destination database
There are two types of replicated function delivery:
Applied – executed at primary databases first and affect primary data. Replication Servers propagate the stored procedure and its parameters, applying data changes asynchronously at replicate sites that have subscriptions for an applied function replication definition. The maintenance user executes the applied function at the replicate sites.
Request – executed at primary databases first and affect primary data. Replication Servers propagate the stored procedure and its parameters, applying data changes asynchronously at replicate sites that have subscriptions for a request function replication definition. The same user who executes the stored procedure at the primary databases executes the request function at the replicate sites.
Typically, the request function delivery is used to modify the remote data asynchronously at databases on other sites. The changes are replicated back to the originating site via either normal data replication or applied function delivery.
See Chapter 10, “Managing Replicated Functions” and Chapter 11, “Managing Subscriptions” for details.