Due to our legacy software we're not doing a whole lot of referential
integrity within the database itself. For example, do not allow an order
line created without a corresponding order header. Therefore we're not
using much (if any) foreign key constraints such as:
create table ordhead (
Ordernumber int as identity,
customernumber int,
primary key(ordernumber)
);
create or replace table ordline (
ordernumber int not null,
orderline int not null,
itemNumber int,
ordqty dec (15,5),
constraint ordline_ordheadFK foreign key (ordernumber) references ordhead
(ordernumber),
constraint ordlinePK primary key (ordernumber, orderline)
);
I've heard from someone that this can be problematic at times with
software based replication. I am trying to get clarification but I think
it had something to do with getting the order of the parent/child updates
reversed. This was causing an exclusive lock on the target causing them
to stop/restart their software based replication to clear the lock.
Sometimes as often as every other day.
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.