DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: sequences

  1. #1
    Join Date
    Apr 2006
    Posts
    9

    Exclamation sequences

    Hy,
    I am new to the forum, and already have problems.
    I'm running on Oracle 805 server on win2k.The problem is:
    my sequnces in db are created using the next rule
    xx||yy||zz||aaaaaaa, where x,y,z,a are numbers, more, when i select
    them from the db(via sql) the string which is returning to me looks like
    xxyyzzaaaaaaa.(they should look like exactly like this,the xxyyzz must remain fixed as value, while aaaaaaa must grown in range with the number provided by increment by value which is normaly assigned between 1 to 20). For some of them the value of the increment by parameter is too large(ie 30000) and therefore the value which i'm getting back in my programs is altered.The nextval param. does not respect anymore, the string above.(the initial xxyyzzaaaaaaa string has became uuvvttbbbbbbb, because of increment by param., which is too big in that case.)
    My question is: is there a way to recreate the sequences without damaging the informations which is related to this sequences?Excluding the create like method.

  2. #2
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,684
    You've lost me totally

    Can you post the CREATE SEQUENCE statement you used, the output from a "SELECT sequence_name.NEXTVAL FROM dual" statement and the result you would like to see.

    Cheers

    Tim...
    Tim...
    OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
    OCA PL/SQL Developer
    Oracle ACE Director
    My website: oracle-base.com
    My blog: oracle-base.com/blog

  3. #3
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Quote Originally Posted by eto_toe_dba
    My question is: is there a way to recreate the sequences without damaging the informations which is related to this sequences?
    The sequence numbers stored in the table are not linked in any way to the sequence itself - they won't change unless you explicitly update them.

    Yes, you can recreate your sequence. BUT you will have to ensure somehow that you won't generate any duplicate values if this is (e.g.) a primary key.
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

  4. #4
    Join Date
    Apr 2006
    Posts
    9
    thanks,Dapi.

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