Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: shared database sequence.

Re: shared database sequence.

From: Nigel Thomas <nigel_cl_thomas_at_yahoo.com>
Date: Mon, 26 Feb 2007 17:16:11 +0100 (CET)
Message-ID: <152909.11795.qm@web58712.mail.re1.yahoo.com>


Syed wrote: Is it possible to share a database sequence between multiple databases? Not in RAC of course. We are planning to have two databses exchanging information (replicating) using third party solution. But, stuck with the issues of sequences. Syed Another approach is to define the sequence separately on each master. If you have two masters, define the sequence to use odd numbers on one master, and even numbers on the other on A: CREATE SEQUENCE myseq START WITH 1 INCREMENT BY 2 ; on B: CREATE SEQUENCE myseq START WITH 2 INCREMENT BY 2 ; If you may be adding more masters later, give yourself an INCREMENT BY that is bigger than the number of masters you are ever likely to have. The advantages of this scheme include: you can tell which master originated the object the online transaction is entirely local (A can operate if B is unavailable, and vice versa); this is the clincher to me: if you could always rely on both being up and available, you wouldn't need replication in the first place... Potential disadvantages are minor: numbers are not globally ordered - latest on A could be far behind latest on B which could also leave many gaps in the sequence HTH Regards Nigel

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Feb 26 2007 - 10:16:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US