How to start/stop replication service using T-SQL? Any store procedure to control the
AFAIK, there's no easy answer to this. It may depend on what kind of replication you're running,
why you want to stop it (not something you would normally want to do) etc.
Look up 'Replication' in BOL (Books On lIne) for more in-depth info on the subject.
Also http://www.mssqlserver.com has some great replication primers.
Look at sp_start_job and sp_stop_job. You should be able to start/stop the replication agent job with these.
Microsoft Natural Language Group
DBA, Sr. DB Engineer
This posting is provided "AS IS" with no warranties, and confers no rights. The opinions expressed in this post are my own and may not reflect that of my employer.
There is however no such thing as a 'replication service', so I'm not really sure as to what the question really is..?
Sorry for the typo-error. I mean replication. Can I stop the replication by using any of the store procedure and of course to get the status of store procedure before performed any actions on the replication (DB).
Well, I'm by no means any replication guru, so I guess that you could.
After all, all things are run through stored procs anyway.
Questions is more why you want to meddle with the replication in this fashion?
Who knows what will happen if you 'manually' stop it - will it still pick up again after you start it?
What if changes has happened in the meantime that leads up to replication conflicts?
..and sorry, I'm not the one who has the answers... =:o/
Viewing 6 posts - 1 through 5 (of 5 total)