PL/SQL (MOSC)

MOSC Banner

Help in resetting sequence

edited Apr 4, 2011 8:37AM in PL/SQL (MOSC) 6 commentsAnswered ✓
Hi,
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

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center