all groups > sql server replication > september 2006 >
You're in the

sql server replication

group:

sp_addsubscription without starting distribution agent


sp_addsubscription without starting distribution agent Stu
9/6/2006 1:48:02 PM
sql server replication:
We're doing transactional replication on SQL Server 2000. We want to
manually synchronize the subscriber, and execute sp_addsubscription with the
@sync_type = N'none' parameter. Is it possible to do this, but NOT have the
distribution agent start automatically? We want the subscription started
with transactions accumulating in the distribution database, but not have
those transactions sent down until we are ready. When ready, we will
manually start the distribution agent.

Re: sp_addsubscription without starting distribution agent Hilary Cotter
9/6/2006 9:27:55 PM
Yes, locate the job in the job folder and uncheck the enable button. Then
you can select enable and start your agents up.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

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



[quoted text, click to view]

Re: sp_addsubscription without starting distribution agent Stu
9/7/2006 6:17:02 AM
Its too late at that point; sp_addsubscription added the distribution agent
and job, and started it. Is it possible to add those items but NOT start
them?

Re: sp_addsubscription without starting distribution agent Stu
9/7/2006 8:23:02 AM
Yeah. Using a bogus subscriber db name kills the agent. But I can't find a
dialogue in Enterprise Manager that lets me alter the subscriber db, and I
can't find a system stored procedure to alter it...How do I correct the
database name?

Re: sp_addsubscription without starting distribution agent Hilary Cotter
9/7/2006 9:49:28 AM
You can do things like create the subscription but deliberately use an
incorrect subscription database name, one which does not exist. Then when
you are ready correct the database name.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

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



[quoted text, click to view]

Re: sp_addsubscription without starting distribution agent Hilary Cotter
9/7/2006 11:51:11 AM
sp_update_jobstep is your friend. Make your changes using the @command
parameter.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

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



[quoted text, click to view]

Re: sp_addsubscription without starting distribution agent Stu
9/7/2006 11:55:02 AM
OK. And what about the dest_db column of the syssubscriptions table in the
publishing database. Will it remain set to the bogus db name? Will it
Re: sp_addsubscription without starting distribution agent Hilary Cotter
9/7/2006 10:10:13 PM
No, you're right. It notices the change and request a new snapshot. I think
you will have to try something like creating a start date for your
distribution agent in the future or something like that.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

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



[quoted text, click to view]

Re: sp_addsubscription without starting distribution agent Stu
9/8/2006 7:56:02 AM
There is a parameter for sp_addsubscription called @active_start_date. Docs
say it is the date when the Distribution Agent is first scheduled. Sounds
perfect! But alas, it doesn't work. If you supply a future date for that
parameter, it STILL kicks off the job immediately.

Was @active_start_date what you were thinking of? Can you give me an
example sp_addsubscription command that really does postpone starting the
distribution agent?
Re: sp_addsubscription without starting distribution agent Hilary Cotter
9/8/2006 12:11:09 PM
set @frequency_type=2 on sp_addsubscription. Then it is a matter of
scheduling the job in the msdb database. You can write scripts to directly
update the msdb job tables to do this.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

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



[quoted text, click to view]

AddThis Social Bookmark Button