Creating a Replication Server Function String

A Replication Server function string is used to map a database command to a data server API. For the rs_select and rs_select_with_lock functions only, the string contains an input template used to match function strings with the database command. For all functions, the string also contains an output template, used to format the database command for the destination data server.

  1. Open Enterprise Explorer, and connect to your primary Replication Server.

  2. Expand the view for your Replication Server connection profile, right-click a primary database for which to create the function string, and choose New Artifact from the context menu.

  3. From the wizard selection screen, select Function string creation wizard, and click Next to start the wizard. You can also start this wizard by right-clicking the Function Strings folder for an existing function-string class and choosing New Function String from the context menu.

  4. Modify the following fields.

    General settings

    FieldExample

    Function Name

    Select a Replication Server function from the menu drop-down.

    Replication Definition

    Select a replication definition for this function string from the menu drop-down.

    Function String Name

    Enter a name for the function string.

    Note

    The commands for creating a function string can be viewed in the Preview field in this and subsequent steps.

  5. Select a function-string class from the menu drop-down.

  6. Specify whether to overwrite any existing function strings of the same name you specified. Click Next to continue.

  7. Select one of the following fields and provide information where required.

    Output

    FieldExample

    No Output

    Select this option if your function string produces no output.

    Language Output Template

    Specify the output template Replication Server should use to map the function to language commands on the destination database. For more information on output templates, see the Replication Server Administration Guide.

    RPC

    Select this option to map your function string to a remote procedure call (RPC). If you select this option, you must specify the name of the RPC and describe its parameters in the grid.

    • Use Add... and Edit... to add or edit a remote procedure parameter setting for the specified RPC. These start the Remote procedure parameter setting wizard, in which you must specify the following:

      • Parameter Name – name of the RPC parameter.

      • Constant – a constant value, if this parameter is a constant.

      • Variable Name and Modifier – if this is a variable, specify a name and modifier from the menu drop-downs.

      Click OK when you are done.

    • Use Remove and Remove All to remove one or all specified RPC parameters.

    Write Text

    This output template can only be used in rs_writetext function strings. For more information, see the Replication Server Administration Guide.

    None

    This option applies only to rs_writetext function strings. For more information, see the Replication Server Administration Guide.

    Click Next to continue.

  8. Specify an input template for this function string in the Input Template text field. For more information on input templates, see the Replication Server Administration Guide.

  9. Click Finish to create the function string.

Editing a Replication Server Function String

Dropping a Replication Server Function String

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com