oracle Sequence -- Oracle Bug ????
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: oracle Sequence -- Oracle Bug ????

Hybrid View

  1. #1
    Join Date
    Jan 2002
    Posts
    17

    Question Oracle Sequence -- Oracle Bug ???

    Hi,

    I am having a problem with Oracle Sequences.

    These are the steps how I encountered the problem

    CREATE OR REPLACE SEQUENCE TEST_SEQ INCREMENT BY 1 START WITH 1 MAXVALUE 25 MINVALUE 0

    SELECT TEST_SEQ.NEXTVAL FROM DUAL;
    NEXTVAL
    ----------
    1
    ...
    SELECT TEST_SEQ.NEXTVAL FROM DUAL;
    NEXTVAL
    ----------
    20

    SELECT TEST_SEQ.CURRVAL FROM DUAL;
    CURRVAL
    ----------
    20

    DROP SEQUENCE TEST_SEQ;
    TEST_SEQ DROPPED.

    CREATE OR REPLACE SEQUENCE TEST_SEQ INCREMENT BY 1 START WITH 1 MAXVALUE 25 MINVALUE 0;
    TEST_SEQ CREATED.

    SELECT TEST_SEQ.CURRVAL FROM DUAL;
    CURRVAL
    ----------
    20

    I am in the same session.Eventhough I dropped the sequence and created again the currval is not flushed from the session.
    And if you query for NEXTVAL from there onwards the CURRVAL is initialized. Is this sequence bahaviour a bug? Because all other objects if they are dropped doesnt have the same behaviour like this sequence.

    Your comments are greatly appreciated.

    Thanks In Advance.
    Sekhar Modem.





    [Edited by s_modem on 05-10-2002 at 06:13 PM]
    Share on Google+

  2. #2
    Join Date
    Dec 2001
    Posts
    221
    which version are u using.

    first of all does "OR REPLACE" really works ????

    i tried the same statements. it worked fine with me.

    did u get "SEQUENCE CREATED" after the create statement.
    Santosh Jadhav
    8i OCP DBA
    Share on Google+

  3. #3
    Join Date
    Apr 2001
    Location
    Bangalore, India
    Posts
    727
    But Jadhav, he is telling the sequence is droped before recreating. In case the recreation is not success, then supposed to get an error. I think the problem is something else...


    Usuall question...! What is your version and OS..?
    Thomas Saviour(royxavier@yahoo.com)
    Technical Lead (Databases)
    Thomson Reuters (Markets)

    http://ora600tom.wordpress.com/
    Share on Google+

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,095
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."
    Share on Google+

Posting Permissions

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



Click Here to Expand Forum to Full Width