[quoted text, click to view] On 2004-12-07, Hilary Cotter <hilary.cotter@gmail.com> wrote:
> This is a good observation on BOL. Its like a dictionary, great as a
> reference, but not very good when you are tying to learn a language.
>
> In general you put all the tables you want to replicate in a single
> publication. However, you may want to seperate the tables into their own
> publications for administrative, logistical, performance or deployment
> reasons.
>
> All tables related by pk fk relationships should be in the same publication.
> Large tables could be in seperate publications as if the snapshot fails you
> only have to resnapshot and deploy the large table, rather than starting
> from scratch again. If you group your tables by DRI, use the independent
> agent option, you could have multiple publications deployed to a single
> subscriber with multiple distribution agents which will lead to performance
> increases.
>
But, how do I make initial snapshot to create foreign key constraints to
tables that aren't in the publication?
For instance, i have these 'key' tables:
l_tax_rates
l_orgs
l_stocks
l_curr_rates
l_banks
l_accounts
....
All of those are rarely changed. Updates are almost never to be happened,
inserts maybe once a year. I put all of those in snapshot replication, and I
have as many subscriptions to that publication as much as I have
subscribers.
Then, I have other tables that are related to above mentioned tables.
Invoices, stock documents, financial stuff of various names I'm unable to
say even in croatian.
When I put those tables in publication, initial snapshot won't create
foreign key constraints to the tables in snapshot publication. I'm not sure
how to avoid this. I'm setting the snapshot options of a merge publication
so that the snapshot leaves the tables on subscribers as they are. So, I
need to take care that tables all have rowguids, that all have constraints
(with NOT FOR REPLICATION option, of course), and that they're empty. Only
aster that I can push the initial snapshot and enable merge replication.
Or is there a better way?
Mike
--
"I can do it quick. I can do it cheap. I can do it well. Pick any two."
Mario Splivalo