Replication Agent supports Replication Server function replication by replicating the invocation of stored procedures in the primary database.
Applied functions are stored procedures that are executed in the primary database and generate transactions that affect data in the primary database.
Request functions are stored procedures that are invoked in one database (for example, a replicate database), then executed in another database (for example, a primary database).
Replication Agent does not distinguish between these two function types, except to supply a specific user and password for use with request functions. If you are using request functions, you must supply the function_username and function_password configuration parameters.
For more information about applied and request functions, see Replication Server Administration Guide > Managing Replicated Functions.
To replicate a stored procedure invoked in a primary database, the stored procedure must be marked for replication, and replication must be enabled for that stored procedure. (This is analogous to marking and enabling replication for tables.)
If a marked stored procedure performs operations that affect a marked table, the operations that affect the marked table are not captured for replication; only the invocation of the marked stored procedure is replicated.
To temporarily suspend replication of a marked stored procedure (for example, when database maintenance operations are performed in the primary database), you can disable replication for the stored procedure.
When you unmark an object that has been marked for replication, the transaction log objects that were created to facilitate the replication for that object are removed from the primary database.
For more information on the Replication Server function replication feature, see the Replication Server Administration Guide.