Function Scope

The scope of a function defines the object to which the function applies: a replication definition or a function-string class.

You must know the scope of a function to determine where to customize a function string at the primary or replicate Replication Server.

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.

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:
  • 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).

  • 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.

See Replication Server Reference Manual > Replication Server System Functions for complete documentation of all of the system functions.

Related concepts
Primary Site for a Function-String Class
Related reference
System Functions with Function-String-Class Scope
System Functions with Replication-Definition Scope