Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
hadoft
Starting Member
20 Posts |
Posted - 2003-09-17 : 05:33:38
|
Hi every bodyAny one can give a clue??I am trying to use join filter in merge replication scenarioThe next text is copied from books online talking about join filtersI am interesting in the red marked text/*************************************************/Join FiltersJoin filters allow cross table relationships to be used in merge replication filters when the filter of one table is based on another table in the publication. A join filter defines a relationship between two tables that will be enforced during the merge process; it is similar to specifying a join between two tables. The join filter names two articles, and specifies the join condition to represent the relationship between the two tables in the articles. The join condition is usually in the form:ARTICLE1_TABLE.COLUMN = ARTICLE2_TABLE.COLUMNJoin filters are typically used in conjunction with row filters and allow the merge process to maintain the referential integrity between the two tables. If a table published with a row filter is referenced by a foreign key in another published table, the foreign key table's article must have a join filter to represent the referential dependency on the primary key table article. SQL Server Enterprise Manager uses this rule when creating a publication to suggest the join filter logic automatically for the foreign key table based in the foreign key reference. For this reason and also for ease of use, it is recommended that you declare the proper primary key to foreign key relationships and then let the join filters be generated automatically when you create a publication using the Create Publication Wizard.Note the syntax for creating FOREIGN KEY constraints with CREATE TABLE or ALTER TABLE allows the NOT FOR REPLICATION option. When this option is set, Microsoft® SQL Server™ 2000 assumes that the reference was validated when the user made the data change; therefore, SQL Server 2000 does not perform the extra processing steps to verify the reference when the merge process synchronizes the data. If this option is used, a merge filter must be defined to avoid invalid foreign key rows at the subscriber./*************************************************/I tried every possible way to make sql server generates the join filter for the RSub table automatically but it didn't I had created a test database, which has tow tables RHead, RSubRSub has a foreign key for the RHead Primary KeyI had create a merge publication then define a row filter on table RHeadbut always I forced to define a join filter on table RSub manuallyHow can I make use of the automatic generation of Join Filter?my real database contain many main, sub, sub sub tables so I am very intersted to solve this problem.Thanks for your time. |
|
|
hadoft
Starting Member
20 Posts |
Posted - 2003-09-17 : 14:14:10
|
| please help |
 |
|
|
|
|
|