i am creating my merge publication via DMO in my VB.NET program. I used
to create only 1 publication, but since i now understand there is a
limit to the number of articles available for a single publication in
merge replication, i changed my program to make a publication for each
our our applications (like AP, AR, etc), which could be up to 15
different publications, some w/ 50+ articles, some w/ 5 articles.
In my program, after the publication is created i do:
For Each objJob In objJobs
If objJob.JobID = objMergePublication.SnapshotJobID Then
objJob.Start()
End If
Next
During that start, it sometimes returns:
Unable to acquire the repication merge administrative application lock
for database 'XXX'. This could be due an active snapshot running while
the schema change (DDL) or the administrative proc change was attempted.
I ASSUME that means that i can't start all of the snapshots right after
the publication is created. But, I would also assume that it means i
will receive the same error if i try to start the snapshot job after all
publications are created (correct me if i am wrong).
Does the error mean that i will have to start one snapshot agent, wait
for it to be finished, then start the second, etc? If so, what is the
easiest way to start a job in VB (either w/ a TSQL script or DMO). Also,
what signal would be returned to the program when the snapshot is
created?
Thanks
Darin
Darin - 30 Jul 2008 19:33 GMT
i got it working by just issue a exec sp_start_job for each of the jobs
it created.
Darin