Friday, February 24, 2012

include declared referential integrity

When i specify 'include declared referential integrity ' for an article
definition, does that mean that the primary key and foreign key definition
on that article are transferred to the subscriber ?
If the table Im replicating is a foreign key table and i specify that option
but i do not have the primary key table on the publisher, will the initial
distribution of the snapshot fail while trying to create this table cos it
cannot reference the primary key table that does not exist ?
Also when i add multiple primary key and foreign key tables to a publication
and specify the 'include declared referential integrity ' option, is
replication smart enough to create these tables on the subscriber in the
right order.. ?
Right now i already have multiple publications one for tables, views,indexed
views bcos replication is not smart enough to know what to create first..
Using trans replication
Thanks
Hassan,
choosing this option will create the PK-FK relationships only when the
related articles are in the same publication and actually have the PK and
the FK explicitly declared on the publisher. The order of creation on the
subscriber takes this into account, although in the case of merge
replication in particluar, we tend to use the Not For Replication attribute
anyway.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com/default.asp
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

No comments:

Post a Comment