Function scope

The scope of a function defines the object to which the function applies: either to a replication definition or to a function-string class. Knowing a function’s scope is important for determining where to customize a function string: at the primary or replicate Replication Server. Functions can have one of two scopes:

Function-string-class scope

A function with function-string-class scope is defined once for the class. Functions with function-string-class scope include system functions that represent transaction-control directives (such as rs_begin, rs_commit, or rs_marker) and do not perform data manipulation. Function strings for user-defined functions do not have class scope.

Function strings for functions with function-string-class scope must be customized at the primary Replication Server for the function-string class. See Table 2-1 for a list of these functions. See “Primary site for a function-string class” for information on assigning a primary site.

Replication-definition scope

A function with replication-definition scope is defined once for a specific table-replication definition or function-replication definition—although the function may have multiple function strings.

Functions with replication-definition scope include: