Groups | Blog | Home
all groups > sql server replication > october 2006 >

sql server replication : Error 28549 and Enforce For Replication, Help needed.


Paul Ibison
10/30/2006 12:00:00 AM
Yes - set the FKs as 'Not For Replication'. Please see this article for a
little more info:
http://www.replicationanswers.com/MergeProcessingOrderArticle.asp
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

Hilary Cotter
10/30/2006 12:00:00 AM
Set the Not For Replication Attribute to true for your foreign key
constraints.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

savvaschr NO[at]SPAM nodalsoft.com.cy
10/30/2006 2:27:53 AM
Hello

I have a database of 52 replicated tables .
I am using several filters on my Merge Replication and I can
synchronize my handhelds just fine.

The problem is that after some updates of the my main database(SQL
2005) when i try to synch the handhelds i get an 28549 error for a
table.

This table has a FK on another table.Is there a posibility that this
table is updated earlier during the synch. than its 'Parent" table and
thats why i am geting this error?

Curently my setting of this table FK (and of all my tables are)

Enforce for replication : YES
Enforce foreing key constrain YES
Insert anbd update specification
deletion rule : no action
update rule : no action

If I set the Enforce foreing key constrains to NO will this solve the
issue?

Thanks

Savvas Christodoulou


PS: SQL 2005
savvaschr NO[at]SPAM nodalsoft.com.cy
11/7/2006 6:41:27 AM
Hi Again

My Settings now in all table foreign keys are

Enforce for replication : NO
Enforce foreing key constrain YES
Insert anbd update specification
deletion rule : no action
update rule : no action

And the "Not For Replication in All Identity columns" is set to YES

And I still get the Error !!!!! Any ideas?

Shall I Also Put the

Enforce foreing key constrain From YES to NO
Is this has to do with Replication or with the Database itselfe.

Thanks
savvaschr NO[at]SPAM nodalsoft.com.cy
11/7/2006 7:25:36 AM

Addition...

Lets say that i have 2 tables
Table 1 Parent
Table 2 Child

The nickname of table 1 is 1000
and of table 2 is 2000

so the nickname is set correct

Now lets say that i have filters on both tables but
Table 1 filter is dynamic and depents on Table 2 data values

Is there an issue on this scenario?

Thanks
savvaschr NO[at]SPAM nodalsoft.com.cy
11/7/2006 7:31:34 AM
[quoted text, click to view]

"If you are using merge replication you should disable this as it can
prevent
errors due to ordering of DML, i.e. a child row arriving before the
parent
row. "

I am using Merge Replication and i have dissabled the "Enforce for
replication"
"Enforce for replication=NO"

My Question is , shall i do the same with the
"Enforce foreign key constaints" ????

I also set the Not For Rwplication = YES

But the problem is again there.
savvaschr NO[at]SPAM nodalsoft.com.cy
11/7/2006 8:20:46 AM

Thanks again for the quick response ...
The issue is that everything Foreign keys and Identities are all NFR
and i have still
issues with this !

Thanks
Hilary Cotter
11/7/2006 10:24:31 AM
In general you should enforce the relationship for replication if you are
using transactional replication, otherwise your original DML will be
replicated and then the cascading updates and cascading deletes.

If you are using merge replication you should disable this as it can prevent
errors due to ordering of DML, i.e. a child row arriving before the parent
row.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Hilary Cotter
11/7/2006 11:11:37 AM
I meant for you to make the foreign key relationships NFR. Make Enforce for
replication also NRF, although merge replication is not sensitive to this..

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

AddThis Social Bookmark Button