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

Home -> Community -> Usenet -> c.d.o.server -> Re: Replication / Offline Template instantiation / Sequences

Re: Replication / Offline Template instantiation / Sequences

From: Stephen B <stephen.bell_at_cgi.ca>
Date: Thu, 24 Jan 2002 08:45:09 -0500
Message-ID: <efU38.12543$Ii5.2956055@news20.bellglobal.com>


Hi Frank,

I wonder ..what if you explore something along this line of thinking...in your main server you issue and maintain the sequence numbers on the master table..and remember, I don't know the details of your environment but..suppose you only assign "permanent" primary key values from the sequence on the server once new records are uploaded from the laptops?

In other words, you do pretty much what you're already doing except skip the "allocating" of sequence numbers..so, each laptop user refreshes their copy of the table
and sees every record with the primary key value assigned at "head office"....when they create a record in the field, their "pending" table has all the information but either
no primary key or a primary key generated by a sequence that is on the laptop (via your template)...when the laptop user connects and uploads their new records you ignore the primary key (if any) created on the laptop and then assign the primary key in the standard way when the records get inserted into the master table...

I'm probably not explaining it well, but the idea is you don't worry about assigning a permanent primary key value at the time the record is created on the laptop,
only when you get it on the server...

I hope you're able to decode this posting!

Best of luck,

Steve

"Frank van Bortel" <fbortel_at_home.nl> wrote in message news:3C4F10E9.53F50DA1_at_home.nl...
> Folks,
>
> I'm in the middle of a project where some 150 laptops
> need to be replicated from a main server. The C/S app
> that runs off the main server is kind of duplicated
> to the laptops (less functionality on laptop than in
> C/S env.).
> No problem so far.
>
> Because of the sheer amount of portable clients, and the
> fact hortizontal partitioning is used, rollout should be
> using a template, preferably instantiated offline (online
> is an option).
>
> Problem is, that there are a couple of sequences (sequences
> cannot be replicated!), for which the following resolution
> was inveted: every client sequence gets upped by 200 (main
> server too!), but gets it's own unique starting point.
> So: client 1 starts at 120001, client 2 starts at 120002,
> 3 at 120003, etc, etc.
>
> Question is: how do I code that into a template? How do I
> know which clients are actually rolled out when rolling
> out (e.g. laptop # 200 is the 7th client being rolled out,
> so the sequence would have to start at 120007)
>
> All ideas welcome (including other sequence problem resolvers,
> as long as I do not have to change from number to varchar2)
> --
> Gtrz,
>
> Frank van Bortel
Received on Thu Jan 24 2002 - 07:45:09 CST

Original text of this message

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