Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have setup a production server and a staging server. Whenever we are at the point in our release cycle where we want to begin testing on staging I want to copy the production DB over to our staging server. I have setup snapshot replication to do this and have setup the staging server to have a pull subscription to the production DB.

I want my continuous integration server to be able to kick off this process. How do I programmatically trigger a snapshot to be created and replicated?

If there is a way to trigger this process is there a way to know when it's finished?

share|improve this question

1 Answer 1

Triggering the snapshot is easy. Simply start the snapshot agent on the distributor. When the snapshot agent stops the snapshot has been created. When it is done start the distribution agent. When it stops, the snapshot has been deployed.

share|improve this answer
Yes, but I would like to do this programmatically. – Chris Jun 13 '12 at 13:14
That would be done by using sp_start_job on the distributor within the msdb database. – mrdenny Jun 15 '12 at 21:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.