June 27, 2007 at 5:54 am
hi
sometimes we use replication scripts to create replications
anyway after runing the scripts , we cant get the snapshot agent to start automatically, we always have to start it using the managment studio or the entrprise manager.
any one can help us here? hwo to get that job run with the script within the execution of those replication scripts
June 27, 2007 at 11:41 am
These are the steps:
1. EXEC sp_MSenum_replication_agents @type = 1
from there extract snapshot Job name that belongs to the publisher_db you are interested
2. EXEC msdb.dbo.sp_start_job @job_name = @SnapshotJobName -- this is the name from previous step
good luck
* Noel
June 28, 2007 at 6:58 am
thanks noel for your help
but i couldnt manage to get the snapshot job name from
EXEC sp_MSenum_replication_agents @type = 1
i tried to insert the result in a temp table but i got an error
so please any help on how to extract the jobname?
another question does this method works on sql server 2000 as well?
thanks in advance
June 28, 2007 at 10:32 am
just use client code to get the results from the stored procedure or use OPENROWSET.
* Noel
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply