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’s RSSD. Any database that functions as a primary database also requires a RepAgent.
To set up RepAgent for the RSSD, follow these steps:
Create a RepAgent user so that RepAgent can log in to Replication Server. Use the create user command:
create user ra_user_name set password {ra_password | null}
where ra_user_name is the name of the RepAgent user and ra_password is the RepAgent’s password.
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.
Execute alter connection, using the log transfer on option:
alter connection to data_server.database set log transfer to 'on'
If the name of the Adaptive Server has not yet been defined, you must define it:
sp_addserver lname, local
where lname is the RSSD’s name.
If RepAgent threads have not been enabled for the Adaptive Server, you must enable them:
sp_configure 'enable rep agent threads'
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.
The “rs_user_name” and “rs_password” configured at the Adaptive Server must be the same as the “ra_user_name” and “ra_password” created at the Replication Server in step 1.
Create the rs_marker stored procedure and set its replicate status to “true,” using the sp_setrepproc system procedure with the function keyword.
You can find the rs_marker stored procedure in the file rs_install_primary.sql or rsinssys.sql in the scripts directory of the Sybase release directory.
See “Creating the rs_marker stored procedure” for details.
Start RepAgent:
sp_start_rep_agent dbname