SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


sp_addsubscription ..... @article = N''all''


sp_addsubscription ..... @article = N''all''

Author
Message
Simon Liddle
Simon Liddle
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1254 Visits: 3178
Hi,

(SQL2k pub, SQL2k dist, SQL7 subs)

I used Enterprise Manager's Generate Script option on one of my publications and noticed that when creating the subscriptions, for most of the subscribers, the script generates:

sp_addsubscription .... @article = N'all' ....

However, for one of the subscribers, there are a number of statements, each specifying one of the articles in the publication but ultimately making a subscription to the same articles as the other subscribers, i.e. all of them:

sp_addsubscription .... @article = N'supplier' .....
sp_addsubscription .... @article = N'customer' .....
sp_addsubscription .... @article = N'user' .....

Is there any difference between these two ways of subscribing to all articles? Is one way 'better' than the other?

Thanks!
Simon
Erik Bitemo
Erik Bitemo
SSC Veteran
SSC Veteran (202 reputation)SSC Veteran (202 reputation)SSC Veteran (202 reputation)SSC Veteran (202 reputation)SSC Veteran (202 reputation)SSC Veteran (202 reputation)SSC Veteran (202 reputation)SSC Veteran (202 reputation)

Group: General Forum Members
Points: 202 Visits: 173
Hi Simon,

There's no difference until you add more articles to your publications. So you can decide which one is the better for you. I would choose the 'all' instead of the lists, because easier to read and understand, and if there's any change in the publication, you don't need to recreate the scripts. And imagine what if you drop a table...

I hope it was an answer to your question.

-- Erik http://blog.rollback.hu
abhijit.dey
abhijit.dey
SSC Rookie
SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)SSC Rookie (44 reputation)

Group: General Forum Members
Points: 44 Visits: 134
its depends upon what option you are using for @sync_type if you are using repl support only option then 1st option is best. because There is a bug in sql server if you mention 'all' while using @sync_type repl support only, in future if you change any schema then that will not snapshot properly.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search