-
Sequence Help
How to find out in a database what sequences are reaching their max value . I need to increase the max_value of these because if they cycle their I will have a unique constraint problem
Thanks
-
select from the dba_sequences, all_sequences, or user_sequences view.
-
Use the dba_sequence/user_sequences view to check this
Code:
View the sequences that are 100 counts short of reaching the max value.
SELECT sequence_name,
sequence_owner,
last_number,
max_value
FROM dba_sequences
WHERE last_number > (max_value-100);
Sam
Last edited by sambavan; 07-15-2003 at 06:36 PM.
Thanx
Sam
Life is a journey, not a destination!
-
How do I compare the CURVAL to max_value for all these sequences ..
-
The last number is your CURVAL
Sam
Thanx
Sam
Life is a journey, not a destination!
-
Thanks
You are always a Great help !
-
alter sequence sequence_name nocycle?
Tomaž
"A common mistake that people make when trying to design something completely
foolproof is to underestimate the ingenuity of complete fools" - Douglas Adams
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|