Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sp_addsubscription ..... @article = N''all'' Expand / Collapse
Author
Message
Posted Friday, August 31, 2007 4:32 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 7:11 AM
Points: 1,110, Visits: 3,122
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
Post #395455
Posted Friday, August 31, 2007 11:15 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, April 1, 2013 2:14 AM
Points: 122, 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
Post #395636
Posted Tuesday, October 29, 2013 4:52 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, August 13, 2014 1:15 AM
Points: 30, Visits: 87
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.
Post #1509264
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse