Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002
    Posts
    14

    Question Unanswered: Sequencing in Oracle giving Problems.



    Hi All,
    I am facing a different problem and its related to sequencing.
    The Problem is when i am using a sequence the sequence value should increment in proper fashion of what the increment value is provided.
    Let say if the sequence i have created is:
    create sequence autonum
    start with 1
    increment by 1
    cache 20
    order;
    Then the above sequence should increment by 1 every time. But it does not happen i dont know but after some execution of the sequences the value of the sequence shoots up like if the value is 150 then at the next execution it should show 151 but it shows 175.
    I dont know why it is happening.
    Can u help me in this regard.

    Thanks.

  2. #2
    Join Date
    Jul 2002
    Location
    Sofia, Bulgaria
    Posts
    5

    Question Re: Sequencing in Oracle giving Problems.

    Hi,

    Check the events, which apply to this sequence. Do you have a table and before insert trigger or something else. If your answer is yes, can you extract and publish the ddl. If your answer is no, what do you use ?


    Originally posted by sahaslad


    Hi All,
    I am facing a different problem and its related to sequencing.
    The Problem is when i am using a sequence the sequence value should increment in proper fashion of what the increment value is provided.
    Let say if the sequence i have created is:
    create sequence autonum
    start with 1
    increment by 1
    cache 20
    order;
    Then the above sequence should increment by 1 every time. But it does not happen i dont know but after some execution of the sequences the value of the sequence shoots up like if the value is 150 then at the next execution it should show 151 but it shows 175.
    I dont know why it is happening.
    Can u help me in this regard.

    Thanks.

  3. #3
    Join Date
    Jul 2002
    Posts
    2
    switch off caching, otherwise you will loose cached sequence numbers
    when shutting down database.

    make sure that NOTHING fits between asking for new sequence number
    and commit statement

    rainer

Posting Permissions

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