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
Replication-definition 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.
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:
System functions that perform data-manipulation operations (such as rs_insert, rs_delete, rs_update, rs_select, rs_select_with_lock, and special functions used in replicating text, unitext, and image data).
See Table 2-2 for a list of these functions.
User-defined functions for table- or function-replication definitions.
System functions with replication-definition scope must be customized at the Replication Server where the replication definition was created. User-defined functions with replication-definition scope must be customized at the Replication Server where the replication definition was created.