Configuring a Replication Server to manage primary tables

If you want to add a route from a Replication Server that was previously configured as a replicate-only Replication Server, you must first set up the RepAgent for the Replication Server RSSD. Any database that functions as a primary database also requires a RepAgent.

To set up RepAgent for the RSSD, follow these steps:

At the Replication Server

  1. Create a RepAgent user so that RepAgent can log in to Replication Server. Use the create user command where ra_user_name is the name of the RepAgent user and ra_password is the RepAgent’s password:

    create user ra_user_name
    set password {ra_password | null}
    

    Grant this user connect source permission, using the grant command:

    grant connect source to ra_user_name
    

    If the Replication Server already manages a primary database, you can use the “RepAgent user” that already exists for the new primary database.

  2. Execute alter connection, using the log transfer on option:

    alter connection to data_server.database
    set log transfer to 'on'
    

At the Adaptive Server

  1. If the name of the Adaptive Server has not yet been defined, you must define it using the following command where lname is the RSSD name:

    sp_addserver lname, local
    
  2. If RepAgent threads have not been enabled for the Adaptive Server, you must enable them:

    sp_configure 'enable rep agent threads'
    
  3. Configure RepAgent for the RSSD with the sp_config_rep_agent system procedure:

    sp_config_rep_agent dbname, 'enable', 'rs_name',
            'rs_user_name', 'rs_password'
    

    Refer to “Configuring RepAgent” for detailed instruction on configuring RepAgent.

    NoteThe value for rs_user_name and rs_password configured at the Adaptive Server must be the same for ra_user_name and ra_password created at the Replication Server in step 1.

  4. Start RepAgent:

    sp_start_rep_agent dbname