Replication conflicting with constraints
Posted in 2000
Topics: High Availability & Replication, Triggers, Constraints & Referential Integrity
Hi,
is there a general informix-problem replicating data with constraints
defined?
The scenario is as follows:
There is one central table (object) containing reference-information for
the general objects. Inserts into tho detail-tables fire a trigger
generating the corresponding dataset in the common table (object) and
linking it to the new detail-row.
Replication now fails as the detailrow is inserted with the object-key
allready set, but the row in the object-table doesnt exist yet. the
transaction is rolled back.
Applying Groups seems to solve the problem. Anyway, after a shutdown and
restart of the server replication is not initialized correctly:
15:29:24 CDR GC: operation repsched cancel frequency failed (error
291902768).
15:29:24 CDR GC: recovery of group objects failed (error = 100)
The server is version 7.30TC3
Anybody knows help?
Greetings Stephan
Hi,
As you have probably discovered, if you are going to do time based
replication and there are RI constraints on the time-based replicated, then
the parent/child relationship must be defined as a group. Also, if you are
replicating the parent and the child, then you should probably disable the
firing of the trigger bacause it will your trigger will be creating data
that you are already replicating. This can cause a conflict.
Concerning the error - The 100 error is a rather generic error that really
doesn't tell us very much. We're trying to eliminate it's usage as quickly
as possible. (I'd really suggest getting on 7.31 instead of 7.30 because
it's much more robust...) The scheduled event error is junk so it won't
help very much. If you open a case with tech support, you probably can get
one of the engineers to figure out what the problem is by using onstat -g
cat.
Stephan Hochberger wrote:
> Hi,
> is there a general informix-problem replicating data with constraints
> defined?
>
> The scenario is as follows:
> There is one central table (object) containing reference-information for
> the general objects. Inserts into tho detail-tables fire a trigger
> generating the corresponding dataset in the common table (object) and
> linking it to the new detail-row.
>
> Replication now fails as the detailrow is inserted with the object-key
> allready set, but the row in the object-table doesnt exist yet. the
> transaction is rolled back.
>
> Applying Groups seems to solve the problem. Anyway, after a shutdown and
> restart of the server replication is not initialized correctly:
> 15:29:24 CDR GC: operation repsched cancel frequency failed (error
> 291902768).
> 15:29:24 CDR GC: recovery of group objects failed (error = 100)>
> The server is version 7.30TC3
>
> Anybody knows help?
>
> Greetings Stephan
--
Madison Pruet
===========================================
Enterprise Replication Product Developement
Dallas, Texas
Informix Software
===========================================
We've also encountered problems with replication and RI constraints. In our
case triggers cannot be blamed.
<--detailed description
We have an application for processing credit cards. Normally evthg is
replicated ok with an exception of card replacement.
This option does the following: updates card number to a new number and then
inserts record with an old card number. This is done to fulfill RI
constraints which are based on a SERIAL column.
In replication logs we see instead a sequence: insert (unsuccesfull) a
record with an old card number and update of old record to a new card
number. It fails because there is a unique index on a card number.
end -->
It appears that Enterprise Replication can change order of instructions
which sometimes goes to the troubles.
There are also many things undocumented, like:
- status of the server (cdr list serv) 'F' (from experience we know that it
means: problem with a server)
- dbexport possible only after cdr stop, which is described in manual as
not safe
- undocumented error codes (manual only lists possible error codes without
explanation)
We have IDS 7.31 on SCO 5.0.5.
Robert Sosnowski
Madison Pruet wrote in message <3A077092.3172587E@informix.com>...
>one of the engineers to figure out what the problem is by using onstat -g
>cat.
>
onstat -g cat is not listed as a valid option when you run onstat --
I've found onstat -g cdr by guessing..
What other 'hidden' options are there? What do they do?
>--
>Madison Pruet
>
>===========================================
>Enterprise Replication Product Developement
>Dallas, Texas
>Informix Software
>===========================================
>
>
For Enterprise Replication...
onstat -g ddr
display the snoopy/replay position
onstat -g grp
display information about the grouper
onstat -g rqm
display information about the queues
onstat -g nif
information about network transfer of replicated data
onstat -g dss
information about the data sync
onstat -g rcv
global receive statistics
smooth1 wrote:
> Madison Pruet wrote in message <3A077092.3172587E@informix.com>...
> >one of the engineers to figure out what the problem is by using onstat -g
> >cat.
> >
>
> onstat -g cat is not listed as a valid option when you run onstat -->
> I've found onstat -g cdr by guessing..
>
> What other 'hidden' options are there? What do they do?
>
> >--
> >Madison Pruet
> >
> >===========================================
> >Enterprise Replication Product Developement
> >Dallas, Texas
> >Informix Software
> >===========================================
> >
> >
--
Madison Pruet
===========================================
Enterprise Replication Product Developement
Dallas, Texas
Informix Software
===========================================
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g