Creating the Connection to RepConnector in Replication Server

Create a new RepConnector connection in the Replication Server, which defines the information that Replication Server uses to connect to the RepConnector server, to replicate data.

Prerequisites
Gather this information:
  • The location of the isql utility, which is in the Replication Server installation directory in OCS-15\bin on Windows or OCS-15/bin on UNIX.

  • The DSI name for the RepConnector connection (from line 3.a on your worksheet; it is also the same name added to the interfaces file).

  • A user name to connect to the RepConnector connection (from line 3.e on your worksheet).

  • A password for this user name (from line 3.f on your worksheet).

Task
  1. Using isql, log in to the Replication Server:
    isql -U <username> -P <pwd> -S <server_name>
    where:
    • username is the user ID with sa permission in the Replication Server.

    • pwd is the password for the user ID.

    • server_name is the name of the Replication Server.

  2. Create the connection and define the user ID and password for the RepConnector connection:
                 create connection to <dataserver>.<database>
                 set error class to rs_sqlserver_error_class
                 set function string class to rs_sqlserver_function_class
                 set username <dsi_username>
                 set password <dsi_password>
                 set batch to 'off'
                 set dsi_xact_group_size to '-1'
                 set dynamic_sql to 'off'
                 set dsi_bulk_copy to 'off'
                 set dsi_row_count_validation to 'off'
                 with dsi_suspended
    where:
    • dataserver is the RepConnector connection DSI name. This is the same name you added to the Replication Server interfaces file. Use the name recorded in 3.a on your worksheet.

    • database is the name of the database to which you are replicating. Record this value in 3.j on the worksheet.

      Note: When you create this connection in Replication Server, you must designate it with the dataserver.database data pair value. However, the database name in Replication Server is only a placeholder, and RepConnector does not use that name. Therefore, use a name that clearly designates the replicate or destination (in this case RepConnector), to manage the RepConnector connection in an environment where you are also managing traditional Replication Server connections, that have destinations that are actually databases. For example, designate the connection as RepConnector.RepCondb.
    • dsi_username is the user ID that is used to connect to the RepConnector connection. Use the value recorded in 3.e on your worksheet.

    • dsi_password is the password for the user ID. Use the value recorded in 3.f on your worksheet.

    • set batch to 'off' is required by RepConnector. This instructs Replication Server not to batch the commands to send to RepConnector.

    • set dsi_xact_group_size to '-1' is required by RepConnector. This instructs Replication Server not to group the transactions as a single transaction before sending them to RepConnector.

    • set dynamic_sql to 'off' is required by RepConnector. This instructs Replication Server not to use dynamic SQL.
    • set dsi_bulk_copy to 'off' is required by RepConnector. This instructs Replication Server not to use the bulk-copy-in feature.
    • set dsi_row_count_validation to 'off' is required by RepConnector. This instructs Replication Server to disable row-count validation.
Note: RepConnector does not support the batching of commands in Replication Server. If you have already created the connection, and have not set the batch and dsi_xact_group_size parameters as indicated above, use the configure connection and alter connection commands to set them. See the Replication Server Reference Manual.
For example:
create connection to RepConnector.RepCondb
set error class to rs_sqlserver_error_class
set function string class to
rs_sqlserver_function_class
set username sa
set password null
set batch to 'off'
set dsi_xact_group_size to '-1'
set dynamic_sql to 'off'
set dsi_bulk_copy to 'off'
set dsi_row_count_validation to 'off'
with dsi_suspended