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 DB2 UDB database.

    • test is the name of the database of the primary DB2 UDB.

    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 maint_user and maint_pwd to the user ID and password of the DB2 UDB maintenance user who must have permission to apply DML operations against all user tables to be replicated, where:
    • maint_user is the user ID of the DB2 UDB maintenance user you created for the primary connection.

    • maint_pwd is the password of the DB2 UDB maintenance user (maint_user).

    Note: This user must be a valid user in the DB2 UDB 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_udb_error_class
    set function string class rs_udb9_function_class
    set username maint_user
    set password change_on_install
    with log transfer on, dsi_suspended 
    go
  5. Execute this script in Replication Server:
    isql –Usa –Psa_pass –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