Start replication form .NET code

  • Hi,

    Is there a way to start replication agent from a .NET code? I have transactional replication running every hour, but sometimes users would need to "nudge" it to run. Does someone have a piece of code that would show me how to call a scheduled task from VB.net?

    Thanks

    Jakub

     

  • Just use MSDB..sp_start_job against the SQL Agent running the job.  If you're pushing, run against the publisher; if you're pulling, run against the subscriber.  Pass the query off to SQL as you would any SQL statement in .NET.

    Scott

  • use the replication activeX control for this.

    --

    Hilary Cotter

    Looking for a SQL Server replication book?

    http://www.nwsu.com/0974973602.html

    Looking for a FAQ on Indexing Services/SQL FTS

    http://www.indexserverfaq.com

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply