Stopping RepAgent

To shut down RepAgent, log in to Adaptive Server and execute sp_stop_rep_agent.

When RepAgent restarts, it scans records starting with the oldest transaction, but it only sends records following the last one processed. Replication Server determines if there are any duplicate records and discards the duplicates.

Once RepAgent has been shut down with sp_stop_rep_agent, it does not automatically start up when the database comes online during data server startup unless you previously set auto start to true with sp_config_rep_agent. Otherwise, you must execute sp_start_rep_agent to start RepAgent and resume automatic start-up.

For example, to stop RepAgent, enter:
sp_stop_rep_agent pubs2
If you shut down RepAgent in this way, Adaptive Server shuts down RepAgent gracefully at the end of the current batch of transactions.
You can also shut down RepAgent immediately using the nowait option. For example:
sp_stop_rep_agent pubs2, nowait

If you shut down RepAgent with the nowait option, Adaptive Server terminates the RepAgent without waiting for currently executing operations to finish.