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.
sp_stop_rep_agent pubs2
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.