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

Thread: Problems with Sequences

Hybrid View

  1. #1

    Question Problems with Sequences

    Hello Gang,

    a quick question for you DB Gurus out there.

    I exported an user from one instance and created a new instance and the user and imported the data back in. I noticed that the sequences were of lower values compared to the sequences in the original instance from where they were imported. It was not even the cached value that was missing, it was more than that. There was a difference of nearly 5000 when cache was just 20.

    I have heard of similar problems before but generally I would have attributed it to cache. Can someone give a valid explanation please? Is there anyway that I get rid of this problem in the future (at the moment I wrote a procedure to check the max value in the table which uses the sequence and I just incremented... as in used nextval in a loop... till the sequence reached the value in the table)

    thanks a million in advance
    -Shyami
    ------------------------------------------
    Shyami.S.Seelan, OCP 8i, 9i DBA
    Dublin, Ireland.
    http://www.geocities.com/shyamiseelan/OCP
    ------------------------------------------

  2. #2
    Join Date
    May 2002
    Location
    USA
    Posts
    462
    create script which collects the values of LAST_NUMBER of view DBA_SEQUENCES on source system( where Export is run)update sequence on target system ( where Import is run) to be equal to LAST_NUMBER so that application sees no gap.

  3. #3
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    What version of the DB are you running?

    Also are you using the CONSISTENT=Y flag when you perform the export

    Regards
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  4. #4
    I am running Oracle 8.0.6 and Yes, I am running Consistent=Y

    Thanks for your help guys,
    -Shyami
    ------------------------------------------
    Shyami.S.Seelan, OCP 8i, 9i DBA
    Dublin, Ireland.
    http://www.geocities.com/shyamiseelan/OCP
    ------------------------------------------

  5. #5
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    A couple of things..

    Do the sequences exists in the target database, if they do you should drop them before the import or they will retain the original values.

    Also was the export direct or conventinal path?

    Regards
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  6. #6
    Jovery,

    Actually the sequences did not exist in the target database. The
    export was conventional path.

    Thanks,
    -Shyami
    ------------------------------------------
    Shyami.S.Seelan, OCP 8i, 9i DBA
    Dublin, Ireland.
    http://www.geocities.com/shyamiseelan/OCP
    ------------------------------------------

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