I have 2 tables which tab B depends on the record on tab A. In publisher,
records are generated to tabA before some audit information record to tabB.
In subscriber, there is replication error that the trigger in tab B couldn't
find the corresponding record in tab A and cause the transactional
replication error. And I found the comand_id within the same xact_segno of
record in tab B is smaller than that of record in tab A. Does it mean the
data in tab B replicate before tab A?
Also, how to know the replication sequence to the subscriber?
Thanks in advance!
That is what it looks like, perhaps its a before trigger.
Do you need DRI enforced on the subscriber? If not uncheck the option to
replicate DRI.
If so, consider replicating the table as two separate articles, one to the
same table on the publisher, the other to the audit table.

Signature
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
>I have 2 tables which tab B depends on the record on tab A. In publisher,
> records are generated to tabA before some audit information record to
[quoted text clipped - 10 lines]
>
> Thanks in advance!