Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

resetting sequences....

575152Dec 11 2007 — edited Dec 13 2007
Hi all,

I have this table which uses sequence as pk and somehow it went out-of-sync....i try to reset it using something like...

alter sequence <seq_name>
increment by 1
minvalue <maxvalue_at_present>

my question is
--how a sequence went out-of-sync all of a sudden when it has the maxvalue set to 999999999999999999999999999 ???

-- can i reset the sequence back to some mid-number....example
say if the seq was 9000 and it got reset by next 9000 (my mistake). Now the nextval from dual is 18000. since 9000 was incremented by another 9000 which are not used, can we reset it back to 9000 and then increment it by 1 again???

Any help is highly appreciated...thanks in advance....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 10 2008
Added on Dec 11 2007
8 comments
1,747 views