Re: cdr_serial issue
Posted in 2007
Thanks. I got this working and I understand now why they did it this
way. You don't want every table to automatically burn serials just
because you have the CDR_SERIAL id turned on.
I wish you could specify serial id parameters like you can specify
sequences. I can't be the only person who wanted to generate serials
in a specific way. I mean they included it in the sequence
specification so the standard committee thought this sort of thing was
at least useful enough to make it part of the standard. I know just
because it is part of the standard doesn't automatically make it a
good thing.
On Nov 9, 12:38 pm, "TBP (The Big Potato)" <T...@NotHere.Co.Uk> wrote:
> bozon wrote:
> > On Nov 9, 8:40 am, bozon <cur...@crowson1.com> wrote:
>
> >>On Nov 9, 8:13 am, bozon <cur...@crowson1.com> wrote:
>
> >>>On Nov 9, 6:54 am, "TBP (The Big Potato)" <T...@NotHere.Co.Uk> wrote:
>
> >>>>bozon wrote:
>
> >>>>>I made a mistake about cdr_serial I assumed that it would work
> >>>>>regardless of whether ER was on or not. This doesn't seem to be the
> >>>>>case. I need to spread out my serial IDs like CDR_SERIAL does.
>
> >>>>>Is there a way to get the functionality of CDR_SERIAL without actually
> >>>>>replicating?
>
> Well, this is a hack, but it does work ... create a replicate with one participant :
>
> create database jj_one_repl in dbspace2 with log;
> database jj_one_repl;
> create table tab1 (col1 serial primary key, col2 char(25)) with crcols lock mode row;> EOF
> cdr define repl -i -A -R -C timestamp -S trans jj_one_repl \\
> "jj_one_repl@nan_1000f_1_cdr:informix.tab1" "select * from tab1"
> cdr start repl jj_one_repl
>
> and ensure you have CDR_SERIAL set to something sensible (2,0 for site 1 and 2,1 for site 2 for example if just 2 sites)
>
> Then you get the CDR_SERIAL behaviour (and ER doing a bit of work to realise it has nothing to do).