Show TOC

Configuring the Adapter on the Replication Server WorkstationLocate this document in the navigation structure

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

Context

These configuration instructions are compatible with source data coming from the SAPĀ® Adaptive ServerĀ® Enterprise database, as well as other databases.

Procedure

  1. Set up the replication system according to the SAP Replication Server documentation.
  2. On a machine that can connect to the Replication Server, create a temporary directory and go to that directory.
  3. Copy the following scripts from the $STREAMING_HOME/adapters/repserver/config directory on the machine where you installed Event Stream Processor to the temporary directory you just created.
  4. Apply these scripts to the Replication Server.
    1. isql -Usa -SSAMPLE_RS -P -i srsa_funcstrings.sql
    2. isql -Usa -SSAMPLE_RS -P -i srsa_errors.sql
    3. isql -Usa -SSAMPLE_RS -P -i srsa_rs_errors.sql
  5. Using the dsedit utility, add an entry to the interfaces (sql.ini) file with the name of the Event Stream Processor workstation and the port used for the Replication Server adapter connection. This entry specifies the Replication Server adapter data server name and TDS Port in the Replication Server Adapter configuration process. The port must match the adapter's tdsListenerPort configuration parameter. See Chapter 6: Using dsedit in the SAP 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
  6. 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 (adminUser) of the Replication Server adapter.
    1. Connect to the Replication Server using isql.
    2. Define the user name and password: they must match the adapter's repConnUser and repConnPasswd configuration parameters.
    create user rsuser
    set password rspassword
    go
  7. Create the connection from the Replication Server to the adapter. This must match the adapter's repSubscriptionServer configuration parameter. 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
    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
    
  8. Create the replication definitions. A replication definition specifies the schema and the source location for a given table or stored procedure.
    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
  9. 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:
    use <database name>
    go
    followed by command:
    sp_setreptable 'TEST', true
    go
  10. 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 Stream Processor workstation.
    create subscription TESTsub
    for TESTrep
    with replicate at RSadapter.RSadapter
    without materialization
    go
    Note You must follow the Setting the JAVA_HOME Environment Variable procedure before using the Replication Server Adapter with SAP Event Stream Processor Studio. Doing it now is recommended.

    You may now log off from the Replication Server.