Show TOC

Configuring the Adapter in StudioLocate this document in the navigation structure

Set up a project using the Replication Server adapter using the visual editor in SAP Event Stream Processor Studio.

Prerequisites

Complete the Replication Server adapter configuration on the Replication Server workstation.

Procedure

  1. Start the Studio and start a new project.
  2. Configure the Replication Server Input Adapter.
    1. In the SAP ESP Authoring, go to the Input Adapters Palette and click on the Replication Server Input Adapter; then go to the Canvas and click again.
    2. Click the Edit Properties icon.
    3. From the Configure Adapter Properties window that opens, configure the adapter parameters used to connect to the Replication Server System Database (RSSD) to obtain metadata on tables and stored procedures:
    Note The RSSD contains the Replication Server system tables which provide information about the databases involved and the data transfer rules. It is hosted and managed by the Adaptive server. Or, it could be an Embedded Replication Server System Database (ERSSD) hosted by an SQL Anywhere database. Provide property values in the same manner for both RSSDs and ERSSDs, except where indicated (if you don't know whether you are working with an RSSD or an ERSSD, look in your Replication Server's configuration file to see whether RSSD_embedded is set to yes or no).
    Property Label Description
    ESP server User ID

    Property ID: espUser

    Type: string

    (Required)User name for connecting to the ESP server.

    ESP server Password

    Property ID: espPassword

    Type: string

    (Optional)ESP server password for the ESP server User ID. Do not use if using RSA authentication.

    Replication Server Connection User

    Propery ID: repConnUser

    Type: string

    (Required) Specify the same user name you specified when Configuring the Adapter on the Replication Server Workstation.

    Replication Server Connection Password

    Property ID: repConnPasswd

    Type: string

    (Required)Specify the same user password you specified when Configuring the Adapter on the Replication Server Workstation.

    RSSD Host

    Property ID: rssdHost

    Type: string

    (Optional for adapter operation; required only for schema discovery) Specify the name of the server on which the RSSD resides.

    RSSD Port

    Property ID: rssdPort

    Type: uint

    (Optional for adapter operation; required only for schema discovery) Specify which port on the RSSD Host to use when accessing the RSSD.

    RSSD Database Name

    Property ID: rssdDatabaseName

    Type: string

    (Optional for adapter operation; required only for schema discovery) Specify the name of the RSSD database created by the Replication Server to store replication information.
    Note For an ERSSD, the RSSD Database Name is to be left blank.
    RSSD User Name

    Property ID: rssdUser

    Type: string

    (Optional for adapter operation; required only for schema discovery) Specify the user name used to connect to the RSSD server during schema discovery. This user must have permissions to run the RSSD Stored Procedures.

    RSSD Password

    Property ID: rssdPasswd

    Type: password

    (Optional for adapter operation; required only for schema discovery) Specify the password for the RSSD user. While this is optional for running, it is required for schema discovery unless your RSSD User Name account does not require a password.

    RSadapter Data server Name

    Property ID: repSubscriptionserver

    Type: string

    (Required)Specify the shared data server and database name that defines the Replication Server connection pointing to the Replication Server adapter within Event Stream Processor. This server name is also used to define an entry in the Replication Server’s interfaces sql.ini file. This value should be used for both the “data server” and “database name” portions of the Replication Server connection definition.

    Project URI

    Property ID: projectUri

    Type: string

    (Required)URI to connect to a project in a cluster environment. The required URI format is: esp[s]://hostname:port/workspace_name/project_name

    Authentication Mechanism Type

    Property ID: authType

    Type: string

    (Required)Specify the authentication mechanism to use: valid values are kerberos, rsa, or user_password. User/Password authentication can employ an LDAP, native OS, or pre-configured user name and password. If you are uncertain what type of authentication you are using, refer to the cluster configuration file.

    RSA Key Store

    Property ID: rsaKeyStore

    Type: string

    (Optional)RSA Key Store file name and location.

    RSA Key Store Password

    Property ID: rsaKeyStorePassword

    Typer: password

    (Optional)RSA Key Store password.

    Kerberos KDC

    Property ID: kerberosKdc

    Type: string

    (Optional)Host name of Kerberos key distribution center. Required if using Kerberos authentication.

    Kerberos Realm

    Property ID: kerberosRealm

    Type: string

    (Optional)Kerberos realm setting. Required if using Kerberos authentication.

    Kerberos Service

    Property ID: kerberosService

    Type: string

    (Optional)Kerberos principal name that identifies an Event Stream Processor cluster. Required if using Kerberos authentication.

    Kerberos Ticket Cache

    Property ID: kerberosTicketCache

    Type: string

    (Optional)Location of Kerberos ticket cache file. Required if using Kerberos authentication.

  3. Select the Advanced tab and configure the adapter parameters for runtime processing, internal communications, and establishing connections through SSL:
    Property Label Description
    Stored Proc Stream Operation

    Property ID: storedProcStreamOp

    Type: choice

    (Advanced)Specify the project stream operation to perform when replicating the Stored Procedure. Valid values are insert and upsert. The default is insert.

    TDS Port

    Property ID: tdsListenerPort

    Type: uint

    (Advanced)Specify the port used by the adapter. This is the port to which the Replication Server connection definition must connect. This port is defined within the interfaces (sql.ini) file on the Replication Server workstation. It defines connectivity between the Replication Server and the adapter.

    Adapter Admin User

    Property ID: adminUser

    Type: string

    (Advanced)Specify a user name for the adapter to use for communications between the first instance of the adapter (the "main listener") and subsequent instances of the adapter. This name can be anything except it must not match the user defined within the Replication Server connection definition.

    Adapter Admin Password

    Property ID: adminPasswd

    Type: password

    (Advanced)Specify a password associated with the user name the adapter uses for communications between the first instance of the adapter (the "main listener") and subsequent instances of the adapter.

    Transactional Stream Operations

    Property ID: isTransactional

    Type: boolean

    (Advanced)Specify whether or not multiple events are transmitted to Event Stream Processor as a single transaction.

    Async Stream Operations

    Property ID: isAsync

    Type: boolean

    (Advanced) Specify whether or not to use asynchronous stream operations.

    Batched Stream Operations

    Property ID: isBatched

    Type: boolean

    (Advanced)Specify whether or not the Replication Server adapter sends data to Event Stream Processor in batches.

    Batch Size

    Property ID: batchSize

    Type: uint

    (Advanced) If the Batched Stream Operations parameter is set to true, specify the number of rows in the batch.

    Publish When Batch is Full

    Property ID: publishWhenBatchFull

    Type: boolean

    (Advanced) If set to true, the adapter writes data to the stream when the batch reaches Batch size. If set to false, the adapter waits for a commit to write data to the stream.

    Error on Missing Stream Column

    Property ID: errorOnMissingStreamColumn

    Type: boolean

    (Advanced)Set to true to send an error back to the Replication Server if a column in the repdef is not defined within the stream. Setting this parameter to false (to avoid frequent disconnections from the Replication Server) is recommended.

    RSSD Table Name

    Property ID: tableName

    Type: tables

    (Advanced)Specify the name of the table in the RSSD. Required if the RSSD table name is different from the corresponding stream name.

    Field Mapping

    Property ID: permutation

    Type: permutation

    (Advanced)Mapping between Event Stream Processor and external fields. Format is the ESP column name equals the database column name to which you are mapping. Multiple mappings are separated by a colon. For example, <stream_columnname>=<database_columnname>:<stream_columnname2>=<database_columnname2>. No default value.

    Property Set

    Property ID: propertyset

    Type: string

    (Advanced) Specifies the name of the property set. Property sets are reusable sets of properties that are stored in the project configuration file. Using these sets allows you to move adapter configuration properties out of the CCL file and into the CCR file. If you specify the same properties in the project configuration file and the ATTACH ADAPTER statement, the values in the property set override the values defined in the ATTACH ADAPTER statement. No default value.

    TDS SSL Port

    Property ID: tdsSslListenerPort

    Type: uint

    (Advanced)The SSL port the adapter will use to communicate securely with Replication Server. This port number should match the SSL port specified in the interfaces (sql.ini) file on the Replication Server workstation. The regular TDS port parameter is still required, as that port is used by the adapter for internal communication. Therefore, when enabling SSL communication, the adapter uses 2 ports.

    Keystore

    Property ID: keystore

    Type: string

    (Advanced)The path to the keystore that contains the certificate used in the SSL handshake with Replication Server. Specify a path relative to the working directory of the application (that is, the <base-directory> property under <ApplicationTypes> in the cluster configuration file), or make the path absolute.

    Key store Password

    Property ID: keyStorePasswd

    Type: string

    (Advanced)The password for the keystore that contains the certificate used in the SSL handshake with Replication Server. Specific password requirements such as minimum number of characters depend on the tool you use to generate the keystore.

  4. Select OK to save the project configuration.
  5. Discover the source tables or stored procedures for the adapter. The schema discovery process establishes a connection to the RSSD and reveals defined subscriptions that target the Replication Server adapter.
    1. Click Schema Discovery in the Adapter shape.
      A list of tables or stored procedures that have Replication Server adapter subscriptions associated with them is returned. The rs_lastcommit table is also returned.
    2. Select one of the discovered tables and click Next.
    3. In the Create Element dialog, choose Create new input window.
    4. Click Finish.
    5. Define primary keys. Each table and stored procedure stream must contain at least one primary key. Making this key match the primary key defined in the replication definition is recommended. Locate the appropriate primary key column and click on the toggle key to the left of it. The toggle key changes to an image of a key.
      Schema discovery adds a special column named ‘ra_pkey’ to the stream definition for a stored procedure. The ‘ra_pkey’ column must be set as the primary key and ‘Autogen’ set to true for stored procedures.
    6. Select Start of the navigation path File Next navigation step Save End of the navigation path to save the changes.
  6. Test data movement to the Event Stream Processor stream. Use the Studio for these steps, unless otherwise noted:
    1. Open the project within the Studio.
    2. Go to the SAP ESP Run-Test perspective.
    3. Run this project in a pre-started cluster. The cluster URI, workspace name, and project name must match the projectURI which is defined in adapter parameters. A successful start-up appears as:
      Stream TEST is ready for Replication Server connections.
    4. Log in to the Replication Server using isql and resume the Replication Server adapter connection:
      resume connection to RSadapter.RSadapter
      go
    5. Insert sample data into the source table.
    6. Verify that the replicated data reaches the Replication Server adapter stream using the Stream View tab in Studio.
  7. Add rs_lastcommit to the project.
    1. Select the rs_lastcommit table returned as part of the schema discovery process and click Next.
      The system displays the Create Element dialog.
    2. If you have not already created an input stream or window, choose Create a new input window, otherwise, choose Create a new named schema.
    3. Click Finish.
    4. Click on the "origin" column icon to set that column as the primary key.
    Note The rs_lastcommit table is non-persistent by default. It is held in memory and cleared when the stream is shut down. This results in a full replay of all remaining items within the Replication Server when the stream is restarted. Making rs_lastcommit persistent to minimize the replay of transactions following a stream restart is recommended.
  8. Configure rs_lastcommit to use the persistent log store.
    1. In the Palette, expand Shared Components.
    2. Click the Log Store component from Shared Components then go to the canvas and click again.
    3. Edit the store property in rs_lastcommit so that it selects the log store.