Results 1 to 7 of 7
  1. #1
    Join Date
    May 2003
    Posts
    9

    Question Unanswered: Sequence increase with larger value than I specify

    Dear all,
    I made several sequences created by the following command on DB2 ver 7.2 Fix pack 5

    create sequence MY_SEQ
    as integer
    start with 1
    increment by 1
    maxvalue 2147483647
    no cycle
    no cache
    order;

    I recognized that when selecting from a sequence, the value if for the first time returned 1, the second return 21, the third returns 41 and so on !?!?!?!?!?!

    I don't know why, the only way I read in DB2 that a missing values in sql appears if cache was used and the DB was shurdown so some values in cache are dropped, but this is not the case with me, as the DB is always up & I don't use cache.

    plz help.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Sequence increase with larger value than I specify

    Is the schema name of the sequence you select from same as the one you have created below ...

    I suggest you check SYSCAT.SEQUNECES , increment column

    select seqschema,seqname,seqtype,start,increment from syscat.sequences where seqname='MY_SEQ'

    HTH

    Cheers

    Sathyaram

    Originally posted by modulo2
    Dear all,
    I made several sequences created by the following command on DB2 ver 7.2 Fix pack 5

    create sequence MY_SEQ
    as integer
    start with 1
    increment by 1
    maxvalue 2147483647
    no cycle
    no cache
    order;

    I recognized that when selecting from a sequence, the value if for the first time returned 1, the second return 21, the third returns 41 and so on !?!?!?!?!?!

    I don't know why, the only way I read in DB2 that a missing values in sql appears if cache was used and the DB was shurdown so some values in cache are dropped, but this is not the case with me, as the DB is always up & I don't use cache.

    plz help.

  3. #3
    Join Date
    May 2003
    Posts
    9

    Angry Re: Sequence increase with larger value than I specify

    I tried this and the yes the same name, and the increment is by 1 as specified !?!?!?!

    Any help


    Originally posted by sathyaram_s
    Is the schema name of the sequence you select from same as the one you have created below ...

    I suggest you check SYSCAT.SEQUNECES , increment column

    select seqschema,seqname,seqtype,start,increment from syscat.sequences where seqname='MY_SEQ'

    HTH

    Cheers

    Sathyaram

  4. #4
    Join Date
    Apr 2003
    Posts
    191

    Re: Sequence increase with larger value than I specify

    Hi,

    you may want to have this addressed by DB2 support. It would help your case if you
    1. upgrade to fp9
    2. create a sample database
    3. create sequences as necessary + catch the ddl
    4. recreate the problem and catch the sql to prove it

    Btw, can you make the problem go away if you create a sequence increased in steps of 2? If so, that would suggest an instantaniation feature which may not necessarily point to a bug.

    Johann

    Originally posted by modulo2
    I tried this and the yes the same name, and the increment is by 1 as specified !?!?!?!

    Any help

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Sequence increase with larger value than I specify

    Johnn

    Is there any specific known problem when you say

    1. upgrade to fp9

    Cheers

    Sathyaram

    Originally posted by jsander
    Hi,

    you may want to have this addressed by DB2 support. It would help your case if you
    1. upgrade to fp9
    2. create a sample database
    3. create sequences as necessary + catch the ddl
    4. recreate the problem and catch the sql to prove it

    Btw, can you make the problem go away if you create a sequence increased in steps of 2? If so, that would suggest an instantaniation feature which may not necessarily point to a bug.

    Johann

  6. #6
    Join Date
    Apr 2003
    Posts
    191

    Re: Sequence increase with larger value than I specify

    Sathyaram,

    well, you may run into trouble with DB2 support, and apart from that I know of no specific problem.

    Then again, if you think about it, fp5 should be about 12 months old.

    Johann

    Originally posted by sathyaram_s
    Johnn

    Is there any specific known problem when you say

    1. upgrade to fp9

    Cheers

    Sathyaram

  7. #7
    Join Date
    May 2003
    Posts
    9

    Unhappy Re: Sequence increase with larger value than I specify

    I installed Fixpak 7 Service level WR21306, also the problem persists ?!?!?!

    I dropped the sequences & re-created it again ( the same problem

    isn't there any other way before contacting IBM support ?

    Originally posted by jsander
    Sathyaram,

    well, you may run into trouble with DB2 support, and apart from that I know of no specific problem.

    Then again, if you think about it, fp5 should be about 12 months old.

    Johann

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •