Slightly OT: Way before AR was available, we built a set of triggers to do the replication job (Oracle 7.0.something). Of course synchronisation of sequences was a hell of a job. Lucky for us, the system was more DSS than OLTP: approx. 3000 - 10.000 transactions/day. Furthermore there was a real Master/Slave database architecture, the slave would only be queried, and wasn't allowed to be updated from ordinary users. This was enforced by pre-DML triggers, which prevented any DML to be executed except those coming form the replication process. Because this was a flight information display system, running on several airports, high availabilty was the goal.

All primary keys were meaningless, a 9 digit number, and generated from a sequence by a pre-insert trigger. Because of some home-grown GUI program, used in the project, the key needed to be unique in the whole set of tables, so onde qequence was used. Ordering was important, gaps were no problem. The same pre-insert-trigger would find a non-null primary key when the record came from the replication process. If a non-null primary key was found, it would start a loop hammering the sequence until it reached the same id as the id just received. So we enforced synchronisation between both sequences, without the need of having them started at different offsets, which would have violated the 'ordered constraint' needed by the GUI-stuff.

Carel-Jan


-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Carel-Jan Engel INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to