Help in sequence reset

From: sankarKK <>
Date: Tue, 29 Mar 2011 12:03:45 -0700 (PDT)
Message-ID: <>


I need help in altering sequence dynamically.

the pl/sql program should be able to do

  1. select sequence name owned by an user
  2. get the last number of the sequence.
  3. get the next value (nextval)
  4. alter the sequence so that nextval is lastnumber+100 for all the sequence selected.

actually I have refreshed one testdb from prod data, now when application trying to insert data (in testdb) getting unique constraint violation message, I am altering the sequence some 50/100 numbers and everything working fine.

thanks in advance
tcy Received on Tue Mar 29 2011 - 14:03:45 CDT

Original text of this message