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. As a result, Replication Server does not receive duplicate records.

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 kills the RepAgent without waiting for currently executing operations to finish.

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. You must execute sp_start_rep_agent, which starts up RepAgent and resumes automatic start-up.