Creating a Replication Server Connection to the Primary Database

Create a Replication Server connection to the primary database.

  1. Go to the $SYBASE/RAX-15_5/scripts/sybase (UNIX or Linux) or %SYBASE%\RAX-15_5\scripts\sybase (Windows) directory.
  2. Make a copy of the rs_create_test_primary_connection.sql script named my_udb_rs_create_test_primary_connection.sql.
  3. Before executing the my_udb_rs_create_test_ primary_connection.sql script against your Replication Server, change all occurrences of {rax}.{test} to the name of the Replication Server connection between it and Replication Agent for UDB, where:
    • rax is the name of the data server of the primary IBM DB2 Universal Database.

    • test is the name of the database of the primary IBM DB2 Universal Database.

    For example, NY.NYudb9.

    Note:

    Save these values to be used later for the rs_source_ds and rs_source_db parameters in the Replication Agent ibmudb.rs file.

  4. Change sys and sys_pwd to the user ID and password of the IBM DB2 Universal Database user who must have permission to apply DML operations against all user tables to be replicated, where:
    • sys is the user ID of the IBM DB2 Universal Database user (sys).

    • sys_pwd is the password of the IBM DB2 Universal Database user (change_on_install).

    Note:

    This user must be a valid user in the IBM DB2 Universal Database, and it must be different from the user defined by the Replication Agent pds_username parameter, which is used for Replication Agent connections to the primary database.

    This command creates a Replication Server connection to the primary database example:
    create connection to NY.NYudb9
    set error class rs_sqlserver_error_class
    set function string class rs_udb9_function_class
    set username sys
    set password change_on_install
    with log transfer on, dsi_suspended 
    go
  5. Execute this script in Replication Server:
    isql –Usa –P –SSAMPLE_RS -i my_udb_rs_create_test_primary_connection.sql

    You see a message indicating that the Replication Server connection to the primary database has been created.

Related tasks
Creating a Database Replication Definition
Creating a Database Replication Subscription
Verifying the ECDA Installed Objects