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
Function replication definitions can be delivered to primary or replicate databases. 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 a function replication definition.
Request – executed at replicate databases to modify data in primary databases. Request functions also have function replication definitions, although no subscriptions are required because requests are always carried out at the primary site.
Typically, request delivery is used by a remote application to modify primary data asynchronously. The changes are replicated back to the originating replicate site via either normal data replication or applied function delivery.
See Chapter 10, “Managing Replicated Functions” and Chapter 11, “Managing Subscriptions” for details.