Configuring the Adapter on an Event Streaming Processor Workstation

Set up a project using the Replication Server adapter on an Event Streaming Processor workstation.

Prerequisites
Complete the Replication Server adapter configuration on the Replication Server workstation.
Task
  1. Start the Studio:
    Option Description
    Windows Click Start > All Programs > Sybase > Event Stream Processor > Studio
    UNIX Enter $ESP_HOME/ESP/studio/esp_studio
  2. Define a new project using the Studio Visual editor. In the Studio, select File > New > Project.
  3. Configure the Replication Server Input Adapter.
    1. Drag the Replication Server Input Adapter from the Input Adapters Palette to the Canvas.
    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:
    RSSD contains information about the databases involved and the data transfer rules.
    Property Label Property ID Type Description
    RSSD Host rssdHost string (Required) The RSSD server port.
    RSSD Port rssdPort uint (Required) Specify the port to use on the server containing the RSSD database.
    RSSD Database Name rssdDatabaseName string (Required) Specify the name of the RSSD database created by the Replication Server to store replication information.
    RSSD User Name rssdUser string (Required) 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.
    ESP Server User ID espUser string (Required) User name for connecting to the ESP Server.
    RSadapter Data Server Name repSubscriptionServer string (Required) Specify the shared data server and database name that defines the replication server connection pointing to the Replication Server adapter within Event Streaming 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 projectUri string (Required) URI to connect to a project in a cluster environment.
    Authentication Mechanism Type authType string (Required) Specify the authentication mechanism to use.
    ESP Server Password

    espPassword

    string (Optional) ESP Server password for the ESP Server User ID. Do not use if using RSA authentication.
    RSA Key Store rsaKeyStore string (Optional) RSA Key Store file name and location.
    RSSD Password rssdPasswd password (Optional) Specify the password for the RSSD user.
    RSA Key Store Password rsaKeyStorePassword password (Optional) RSA Key Store password.
  4. Select the Advanced tab and configure the adapter parameters for runtime processing and internal communications:
    Property Type Property ID Type Description
    Stored Proc Stream Operation storedProcStreamOp choice (Advanced) Specify whether an insert or upsert operation is performed with stored procedure for the stream in Replication Server. Defaults to insert.
    TDS Port tdsListenerPort 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 adminUser string (Advanced) Specify a user name for the adapter to use for internal communications. This name can be anything except it must not match the user defined within the Replication Server connection definition.
    Adapter Admin Password adminPasswd password (Advanced) Specify a password associated with the user name the adapter uses for internal communications.
    Transactional Stream Operations isTransactional boolean (Advanced) Specify whether or not Event Streaming Processor data changes are in a Sybase transaction. This causes changes to be committed to a log store immediately after the transaction. This parameter should be set to true when using a log store for a persistent rs_lastcommit.
    Async Stream Operations isAsync boolean (Advanced) Specify whether or notEvent Streaming Processor data changes are in an Sybase transaction. This parameter allows you to use asynchronous stream operations.
    Batched Stream Operations isBatched boolean (Advanced) Specify whether or not the Replication Server adapter sends data to the Sybase Event Streaming Processor in batches.
    Batch Size batchSize 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 publishWhenBatchFull 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 errorOnMissingStreamColumn 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. Sybase recommends you set this parameter to false (to avoid frequent disconnections from the replication server) is recommended.
    RSSD Table Name tableName tables (Advanced) Specify the name of the table in RSSD. Required if the RSSD table name is different from the corresponding stream name.
    Field Mapping permutation permutation (Advanced) Specify mapping between the internal and external fields.
    Property Set propertyset string (Advanced)

    (Advanced) Specifies the name of the property set (a group of properties and values) you want to use from the project configuration 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.

  5. Select OK to save the project configuration.
  6. 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. Sybase recommends that this key match the primary key defined in the replication definition. 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 File > Save to save the changes.
  7. 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 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 startup appears as:
      Stream TEST is ready for Replication Server connections.
    4. Log in to the Replication Server 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.