Creating Table Replication Definitions

A table replication definition defines a table data source for replication. Before you create a table replication definition, make sure you have started and connected to your Replication Server. To create a table replication definition, 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 replication definition, and choose New Artifact from the context menu.

  3. From the wizard selection screen, select Table Replication Definition, and click Next to start the wizard. You can also start this wizard by right-clicking the Table Replication Definitions folder for a primary database and choosing New Table Replication Definition from the context menu.

  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.

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

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

    Name Prefix and Suffix

    Specify the following values:

    • Prefix for RepDef name – the prefix for the table replication definition. For example, the default prefix for a Replication Server named MyRepServer is "MyRepServer_".

    • Suffix for RepDef name – the suffix for the table replication definition. The default suffix is "_rd".

    Display Options

    Specify whether to display all tables or only marked tables.

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

    Table Replicate Definition

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

  5. Replicate tables are displayed in the Table replicate definition grid. Select tables for the replication definition with the corresponding check boxes, and provide information for the modifiable fields in the Table replicate definition grid, if necessary.

    Click Next to continue.

  6. The tables marked for replication are displayed in the Replicated tables grid. The columns for these tables are shown in the Table columns grid. Select columns with the corresponding check boxes, and provide information for the following fields in the Table columns grid, if necessary.

    Specify table replication definition columns

    FieldExample

    Column

    The name of the table column.

    Replicate As

    Specify the name by which you want this column to be known in the replicated table, that is, the table to which this information is replicated. As a default, this field contains the column name of table to be replicated. To modify this value, double-click in the field, and type the desired column name.

    Data Type

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

    Map To

    Specify the datatype to which you want this column to be mapped in the replicated table, that is, the table to which this information is replicated. As a default, this field has the column datatype of the table to be replicated. To modify this value, double-click in the field, and select a datatype from the menu drop-down.

    PKey

    Specify the primary key for the replicated table. As a default, the primary key specified is the same as that for the table in the primary database. To modify this value, select the checkbox for each column you want to compose the primary key in the replicated table.

    Searchable

    Select the checkbox for all columns you want to be searchable in the replicated table.

    Nullable

    Select the checkbox for the columns you want to be nullable in the replicated table. Only columns of type text, image, or raw object are nullable.

    Replicate If Changed

    Select the checkbox for all columns you want to be replicated in the event of changes to column data. Only columns of type text, image, or raw object have a check box for this field.

  7. When you have finished specifying tables, specify how to handle the commands for creating a table 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.

Click Finish to close the wizard.

Creating Database Replication Definitions

Creating Function Replication Definitions

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