I am adding a table to an existing publication that has one pull subscription
using the steps listed below. When I run the snapshot agent, it does not
recognize the newly added article ("no subscriptions needed initialization").
I WANT TO RUN THE SNAPSHOT FOR JUST ONE TABLE. Do I need to drop and readd
the subscriber or subscription? If so, please let me know the steps.
ALSO, the steps below did work on a QA server but failed in production.
-- Thanks for your help.
exec sp_addarticle @.publication = N'my_PUBLICATION', @.article = N'my_TABLE',
@.source_owner = N'dbo', @.source_object = N'my_TABLE', @.destination_table =
N'my_TABLE', @.type = N'logbased', @.creation_script = null, @.description =
null, @.pre_creation_cmd = N'drop', @.schema_option = 0x00000000000000F3,
@.status = 16, @.vertical_partition = N'false', @.ins_cmd = N'CALL
sp_MSins_my_TABLE', @.del_cmd = N'CALL sp_MSdel_my_TABLE', @.upd_cmd = N'MCALL
sp_MSupd_my_TABLE', @.filter = null, @.sync_object = null, @.auto_identity_range
= N'false', @.force_invalidate_snapshot = 1
GO
select * from distribution..msArticles where article = 'my_TABLE'
go
EXEC sp_refreshsubscriptions
N'my_PUBLICATION'
go
exec sp_reinitsubscription
@.publication = 'my_PUBLICATION',
@.article = 'my_TABLE',
@.for_schema_change = 1,
@.subscriber = 'all'
GO
exec sp_addsubscription
@.publication = 'my_PUBLICATION',
@.article = 'my_TABLE',
@.subscriber = N'SUB_SERVER',
@.destination_db = N'pub_sub_database',
@.sync_type = N'automatic',
@.update_mode = N'read only'
I think you need to run sp_refreshpublications to get it to pick up the
changes.
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
"sbawa" <sbawa@.discussions.microsoft.com> wrote in message
news:F24C7DED-985E-4011-B4E7-F2C5E972F8EC@.microsoft.com...
>I am adding a table to an existing publication that has one pull
>subscription
> using the steps listed below. When I run the snapshot agent, it does not
> recognize the newly added article ("no subscriptions needed
> initialization").
>
> I WANT TO RUN THE SNAPSHOT FOR JUST ONE TABLE. Do I need to drop and
> readd
> the subscriber or subscription? If so, please let me know the steps.
> ALSO, the steps below did work on a QA server but failed in production.
> -- Thanks for your help.
>
> exec sp_addarticle @.publication = N'my_PUBLICATION', @.article =
> N'my_TABLE',
> @.source_owner = N'dbo', @.source_object = N'my_TABLE', @.destination_table =
> N'my_TABLE', @.type = N'logbased', @.creation_script = null, @.description =
> null, @.pre_creation_cmd = N'drop', @.schema_option = 0x00000000000000F3,
> @.status = 16, @.vertical_partition = N'false', @.ins_cmd = N'CALL
> sp_MSins_my_TABLE', @.del_cmd = N'CALL sp_MSdel_my_TABLE', @.upd_cmd =
> N'MCALL
> sp_MSupd_my_TABLE', @.filter = null, @.sync_object = null,
> @.auto_identity_range
> = N'false', @.force_invalidate_snapshot = 1
> GO
> select * from distribution..msArticles where article = 'my_TABLE'
> go
> EXEC sp_refreshsubscriptions
> N'my_PUBLICATION'
> go
> exec sp_reinitsubscription
> @.publication = 'my_PUBLICATION',
> @.article = 'my_TABLE',
> @.for_schema_change = 1,
> @.subscriber = 'all'
> GO
> exec sp_addsubscription
> @.publication = 'my_PUBLICATION',
> @.article = 'my_TABLE',
> @.subscriber = N'SUB_SERVER',
> @.destination_db = N'pub_sub_database',
> @.sync_type = N'automatic',
> @.update_mode = N'read only'
>
|||I tried using object search but unable to find this procedure in any of the
databases. Please help.
Your book on transactional replication is great. But you can probably see
that I haven't gotten too far into it yet.
"Hilary Cotter" wrote:
> I think you need to run sp_refreshpublications to get it to pick up the
> changes.
> --
> 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
> "sbawa" <sbawa@.discussions.microsoft.com> wrote in message
> news:F24C7DED-985E-4011-B4E7-F2C5E972F8EC@.microsoft.com...
>
>
Thursday, February 9, 2012
Adding a table to transactional repliaction
Labels:
adding,
agent,
below,
database,
existing,
microsoft,
mysql,
oracle,
publication,
pull,
repliaction,
run,
server,
snapshot,
sql,
steps,
subscriptionusing,
table,
transactional
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment