Replicated Functions

Replicating Adaptive Server stored procedures asynchronously between databases can improve performance over normal data replication by encapsulating many changes in a single replicated function. Because they are not associated with table replication definitions, replicated functions can execute stored procedures that may or may not modify data directly.

You can replicate stored procedure invocations from a primary database to a replicate database, or from a replicate database to a primary database.

With replicated functions, you can execute a stored procedure in another database. You can:

Like tables, replicated stored procedures may have replication definitions, which are called function replication definitions, and subscriptions. When a replicated stored procedure executes, the Replication Server passes its name and execution parameters to subscribing sites, where the corresponding stored procedure executes.

You create function replication definitions at the primary data site. Replication Server supports applied functions and request functions.

An applied function and a request function are replicated from a primary to a replicate database. You create subscriptions at replicate sites for the function replication definition and mark the stored procedure for replication in the primary database. The applied function is applied at replicate database by maint_user whereas the request function is applied at replicate database by the same user who executes the stored procedure at the primary database.

Related concepts
Applied Functions
Request Functions