Sunday, March 11, 2012

Can subscribers pick and choose articles?

Can a subscription of a snapshot publication containing 2 or more articles
choose which articles it wants? For example, if the publication has 5
articles published, and the subscriber only wants 3 of them, can the
subscriber specify the 3 or does it have to take all 5?
I know this cannot be achieved using the wizards but I believe it is an
option when you use the stored procedures. I would appreciate some info on
this.
BTW, I am using SQL 2005. Thanks!
Johnny,
for transactional replication, have a look at the following types of script:
exec sp_dropsubscription @.publication = 'tTestFNames'
, @.article = 'tEmployees'
, @.subscriber = 'RSCOMPUTER'
, @.destination_db = 'testrep'
exec sp_addsubscription @.publication = 'tTestFNames'
, @.article = 'tEmployees'
, @.subscriber = 'RSCOMPUTER'
, @.destination_db = 'testrep'
The obvious caveat would be that your system becomes less maintainable this
way.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I am using snapshot replication. Do you recommend I create separate
publications instead on all in one?
"Paul Ibison" wrote:

> Johnny,
> for transactional replication, have a look at the following types of script:
> exec sp_dropsubscription @.publication = 'tTestFNames'
> , @.article = 'tEmployees'
> , @.subscriber = 'RSCOMPUTER'
> , @.destination_db = 'testrep'
> exec sp_addsubscription @.publication = 'tTestFNames'
> , @.article = 'tEmployees'
> , @.subscriber = 'RSCOMPUTER'
> , @.destination_db = 'testrep'
> The obvious caveat would be that your system becomes less maintainable this
> way.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
|||Johnny,
this should also work for snapshot (merge is the exception), however, I'd
recommend separate publications as it'll be more 'visible' in terms of
management. The downside is that You'll be locking the tables on the
publisher twice instead of once.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

No comments:

Post a Comment