Creating Function Replication Definitions

A function replication definition is a description of a replicated function used in replicated function delivery. The function replication definition, maintained by Replication Server, includes information about the parameters to be replicated and the location of the primary version of the affected data. To create a function replication definition from Workspace, use the following procedure.

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

  2. Expand the view for your Replication Server connection profile, right-click a primary database for which to create the function replication definition, and choose New Artifact from the context menu. You can also start this wizard by right-clicking the Function Replication Definitions folder for a primary database and choosing New Function Replication Definition from the context menu.

  3. From the wizard selection screen, select Function Replication Definition creation wizard, and click Next to start the wizard.

  4. Modify the following input fields.

    Specify the primary data location

    FieldExample

    Primary Location

    Specify the following values:

    • Primary connection profile type – the type of connection appropriate for your primary data server.

    • Primary connection profile name – the name you have assigned to your primary data server connection profile. If there is no connection profile for this data server, you can create one by clicking Create... to start a New Connection Profile wizard. See Connection Profiles for information.

      Note

      For a warm standby replication system, this value could be the name of the database connection profile for the active database or the standby database.

    • Primary server – the name of your primary data server .

    • Primary database – the name of your primary database on the specified data server .

    Display Options

    Specify whether to display all functions or only marked functions.

    To display functions according to a text pattern, click Display by name pattern, enter a text pattern indicating the names of functions to be replicated, and click Filter. To specify any character, enter "?". To specify any string, enter "*". To show all functions, leave this field empty.

    Function Replication Definition

    Specify functions in the grid. Use Select All and Deselect All to select or deselect all tables. Use Revert to revert selections.

    Click Next to continue.

  5. The stored procedures selected for replication are displayed in the Replicated stored procedures grid. Any parameters for these stored procedures are shown in the Parameters grid. Specify the following fields in the Parameters grid. Select parameters with the corresponding check boxes, and provide information for the following fields in the Parameters grid, if necessary. By default, all parameters are selected.

    Specify function replication definition parameters

    FieldExample

    Parameter Name

    These are the parameter names for the specified stored procedure. You cannot edit this field.

    Data Type

    Specify the datatype of the parameter. As a default, this field contains the datatype specified in the DDL defining the stored procedure. To modify this value, double-click in the field, and select a datatype from the menu drop-down or type in a datatype.

    Searchable

    Select the checkbox for all parameters you want to be searchable in the replicated stored procedure.

  6. When you have finished specifying functions, specify how to handle the commands for creating a function replication definition.

    • Click Generate script to have the creation script displayed in the RepServer Scrapbook when you are finished with the wizard. This option is selected by default.

    • Click Execute immediately to have the script execute once you are finished with the wizard. This option creates the replication definition on the server.

Click Finish to close the wizard.

Dropping a Replication Definition

Editing a Replication Definition

Creating Database Replication Definitions

Creating Function Replication Definitions

Creating a Replication Server Function String

Creating a Replication Server Function-String Class

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