Saturday, February 25, 2012

Replication job does not end - even when its idle on the server

I am the two stored procedures below, used in a similar way, to add a
subscription. But for some reason, the replication completes but it does not
stop. If I add a subscription using Enterprise manager (EM), the job does
stop. I scripted out the subscription that EM had created and noticed that
extra code had been added to create the replication jobs (ie. if you generate
the script for a job, there is an option to "script creation of replication
jobs"). Do I need to do this too?
Any help would be very much appreciated.
ServerName...../
use NewTest
GO
exec sp_addpullsubscription @.publisher = @.@.ServerName, @.publisher_db =
'pubs',
@.publication = 'pubs', @.independent_agent = 'true',
@.subscription_type = 'anonymous', @.update_mode = 'read only',
@.immediate_sync = 1
GO
exec sp_addpullsubscription_agent @.publisher = @.@.ServerName, @.publisher_db =
'pubs', @.publication = 'pubs', @.distributor = @.@.ServerName,
@.subscriber_security_mode = 1, @.distributor_security_mode = 1, @.use_ftp =
'true', @.publication_type = 1
GO
/..... End: Script to be run at Subscriber: @.@.ServerName ...../
What does the replication job which does not stop say?
Scripting replication jobs is not necessary unless you have customized them.
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
""Julian Reed via droptable.com"" <forum@.droptable.com> wrote in message
news:50DAB174F7810@.droptable.com...
> I am the two stored procedures below, used in a similar way, to add a
> subscription. But for some reason, the replication completes but it does
not
> stop. If I add a subscription using Enterprise manager (EM), the job does
> stop. I scripted out the subscription that EM had created and noticed
that
> extra code had been added to create the replication jobs (ie. if you
generate
> the script for a job, there is an option to "script creation of
replication
> jobs"). Do I need to do this too?
> Any help would be very much appreciated.
> ServerName...../
> use NewTest
> GO
> exec sp_addpullsubscription @.publisher = @.@.ServerName, @.publisher_db =
> 'pubs',
> @.publication = 'pubs', @.independent_agent = 'true',
> @.subscription_type = 'anonymous', @.update_mode = 'read only',
> @.immediate_sync = 1
> GO
> exec sp_addpullsubscription_agent @.publisher = @.@.ServerName, @.publisher_db
=
> 'pubs', @.publication = 'pubs', @.distributor = @.@.ServerName,
> @.subscriber_security_mode = 1, @.distributor_security_mode = 1, @.use_ftp =
> 'true', @.publication_type = 1
> GO
> /..... End: Script to be run at Subscriber: @.@.ServerName ...../

No comments:

Post a Comment