Re: sequences

From: saurabh manroy <>
Date: Tue, 11 Mar 2014 15:44:19 +0100
Message-ID: <>

Hi Brian,

Hoping that your application can tolerate skipping some sequence values, One simple way that I use to refresh sequences is :

  1. Make note of the increment by value for sequence(s1) on source database.
  2. Get last_number from dba_sequences at the source database for s1. Last_number will provide the last cached value.
  3. Alter the sequence on destination database and set 'increment by' to a value found in step 2.
  4. Issue 'select s1.nextval from dual' to make sure that sequence moves to the expected value.
  5. Change the increment by value back to the one identified in step 1.

Saurabh Manroy

On Tue, Mar 11, 2014 at 3:05 PM, Zelli, Brian <>wrote:

> I am exporting data from 10g to 11g and when we did it in test, the
> analyst said the sequences were out of whack. I would then play around
> until I could get it close. How do I deal with a sequence after it has
> been imported so it starts with the next value?
> Brian
> This email message may contain legally privileged and/or confidential
> information. If you are not the intended recipient(s), or the employee or
> agent responsible for the delivery of this message to the intended
> recipient(s), you are hereby notified that any disclosure, copying,
> distribution, or use of this email message is prohibited. If you have
> received this message in error, please notify the sender immediately by
> e-mail and delete this email message from your computer. Thank you.

Received on Tue Mar 11 2014 - 15:44:19 CET

Original text of this message