Configuring the Adapter on the Replication Server Workstation

Set up the Replication Server adapter, schema, and source location on the Replication Server workstation.

The adapter copies information from one database to another. These configuration instructions are compatible with source data coming from the Sybase Adaptive Server Enterprise database, as well as other databases.

  1. Set up the replication system according to the Sybase Replication Server documentation.
  2. Using the dsedit utility, add an entry to the interfaces (sql.ini) file with the name of the Event Streaming Processor workstation and the port used for the Replication Server adapter connection. This entry used to specify the Replication Server adapter data server name and TDS Port in the Replication Server Adapter configuration process. See Chapter 6: Using dsedit in the Sybase Adaptive Server Enterprise 15.7 Utility Guide for more information on modifying the interface or sql.ini files. For example, if the adapter and the Event Streaming Processor are on a workstation named my_workstation and the connection is to be made on port 5100, use:
    [RSadapter]
    query=TCP,my_workstation,5100
  3. Define the user name and password.
    create user rsuser
    set password rspassword
    go
  4. Create the connection from the Replication Server to the adapter. Use the same server name used in the previous step (and later for the Replication Server adapter configuration). Log in to the Replication Server to create the Replication Server adapter connection. For example,
    create connection to RSadapter.RSadapter
    set error class to srsa_error_class
    set function string class srsa_function_class
    set username rsuser
    set password rspassword
    set batch to “off”
    with dsi_suspended
    go
    alter connection to RSadapter.RSadapter
    set replication server error class to srsa_rs_error_class
    go
    To turn off minimal columns,
    alter connection to RSadapter.RSadapter
    set replicate_minimal_columns to 'off'
    go
    Note: Do not use minimal columns in the repdef.
    To enable batching,
    alter connection to RSadapter.RSadapter
     set batch to 'on'
    go
    alter connection to RSadapter.RSadapter
     set dsi_cmd_separator to ';'
    go
    
    Define the user name and password used for this connection within the Replication Server. This user name must not be the same as that of the administrator user of the Replication Server adapter.
  5. Create the replication definitions. A replication definition specifies the schema and the source location for a given table or stored procedure. Log into the Replication Server to create the sample TEST replication definition.
    There is a replication definition for a source table named "TEST" (create table TEST (ID int, FNAME char(15)), which is defined on a sourced database located on an Adaptive Server Enterprise server named ASEHOST.
    create replication definition TESTrep
    with primary at ASEHOST.sourcedb
    with all tables named ‘TEST’
    (ID int, FNAME char(15))
    primary key (ID)
    go
  6. Mark the Adaptive Server Enterprise source "TEST" table for replication. Log in to the Adaptive Server Enterprise server, locate the source table "TEST", and execute:
    esp_setreptable ‘TEST’, true
    go
  7. Define the subscriptions. Each subscription defines a target for the information coming through the Replication Server. In the following example, the target is the Replication Server adapter connection for the Replication Server adapter located on the Event Streaming Processor workstation. Log in to the Replication Server to create the sample TEST subscription:
    create subscription TESTsub
    for TESTrep
    with replicate at RSadapter.RSadapter
    without materialization
    go