a sequence question
Posted in 2010
Topics: Platform-Specific Issues
Dear All..
I've 2 IDS 11.50.uc6 engine in 2 servers running RedHat Linux ,
say ifx1 and ifx2 , there is a sequence like following :
CREATE SEQUENCE seq_1INCREMENT BY 1 START WITH 2000000
MAXVALUE 4000000 MINVALUE 2000000
in both engine , ifx1 and ifx2 !!
Suppose in ifx1 , "select seq_1.nextval from systables where tabid = 1"
to get the value from seq_1 , 1 million times , so it is 3000000 now for seq_1,
and then I like to get 3000001 from seq_1 of ifx2 , I can achieve it by :
(both in ifx2 , of course )
1.
"select seq_1.nextval from systables where tabid = 1" 1 million times for
nothing !!
2.
modify seq_1 schema !!
Is there any method so that I can get 3000001 in preceding case without
modify schema or 1 million select sql ? like a tiny update sql in seq_1 ?
Any suggestions are welcome !!
I am sorry , but I've found the following do the work !! Alter sequence if8seqno restart with 3000001;
Drop and recreate the sequence with 3000000 as the starting value?
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Thu, Oct 7, 2010 at 4:18 AM, MARS CHEN <mars@jsun.com> wrote:
> Dear All..
>
> I've 2 IDS 11.50.uc6 engine in 2 servers running RedHat Linux ,
> say ifx1 and ifx2 , there is a sequence like following :
>
> CREATE SEQUENCE seq_1> INCREMENT BY 1 START WITH 2000000
> MAXVALUE 4000000 MINVALUE 2000000
>
> in both engine , ifx1 and ifx2 !!
>
> Suppose in ifx1 , "select seq_1.nextval from systables where tabid = 1"
> to get the value from seq_1 , 1 million times , so it is 3000000 now for
> seq_1,
> and then I like to get 3000001 from seq_1 of ifx2 , I can achieve it by :
> (both in ifx2 , of course )
>
> 1.
> "select seq_1.nextval from systables where tabid = 1" 1 million times for
> nothing !!
>
> 2.
> modify seq_1 schema !!
>
> Is there any method so that I can get 3000001 in preceding case without
> modify schema or 1 million select sql ? like a tiny update sql in seq_1 ?
>
> Any suggestions are welcome !!
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0016362836ead7f5660492050540