![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
|
|'START WITH '||TO_CHAR(last_number+100)||' ' |'INCREMENT BY '||increment_by||' ' |'CACHE '||cache_size||';' FROM dba_sequences |
#3
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |