Chapter 12 Working with Replication Server


Function string

Replication Server uses a template called a function string to construct the commands it submits to a database. At runtime, variables in the function string are replaced with values from the function.

A function is a name associated with a data server operation. For example, rs_insert is the system function that inserts a row in a table, and rs_begin is the system function that initiates a transaction. System functions can manipulate data, as does rs_insert, or control transactions, as does rs_begin.

Mapping

You design a function string the following way:

Replication Server concept PowerDesigner concept
Function string Article event script (when a replication definition is defined)
Replication event script (when no replication definition is defined)

Extended attributes

The following extended attributes are available from the property sheet of a replication event script and from the property sheet of an article event script:

Name Internal Code Description
Function string class name FunctionClass Name of the function class
Overwrite function class FunctionClassOverwrite Function class overwrite option
Function string name FunctionString Specifies a name for the function. This fields is used for rs_select, rs_select_with_lock, rs_get_textptr, rs_textptr_init, rs_writetext events
Log type Log Type of log: "use primary log", "with log" or "no log"
Scan template ScanTemplate Input template of a function string for the where clause in a create subscription command
Script output type ScriptOutput Type of output script: "language" or "rpc
Value parameter type VariableModifier Type of value parameter

 


Copyright (C) 2007. Sybase Inc. All rights reserved.