- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Oracle Sequence
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2001 08:18 PM
08-09-2001 08:18 PM
Oracle Sequence
I am using Oracle sequence in my my stored procedure.
select my_seq.nextval
into l_seq
from dual;
However I discover that the sequence generated has gaps occasionally. For example, it was okay for a while from 1 to 500. But the next time it actually begins at 631 !!!
Why does this happen and how can I overcome this problem?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2001 02:03 AM
08-10-2001 02:03 AM
Re: Oracle Sequence
There are a number of things to check
1) Is the interval being changed ever?
2) I assume it's "nocycle" - ie doesn't cycle to minvalue when you get to maxvalue
3) Other users are not selecting from the sequence unknown to you
4) - This is probably it - If the stored procedure doesn't commit the transaction - I'm assuming you're putting the sequence values into a table - the stored procedure has still selected from the sequence and incremented value. This is usually how gaps in sequence numbers occur.
Regards
Howard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2001 10:17 PM
08-12-2001 10:17 PM
Re: Oracle Sequence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2001 11:21 PM
08-19-2001 11:21 PM
Re: Oracle Sequence
"This member has assigned points to 0 of 58 responses to his/her questions"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2001 11:55 PM
08-19-2001 11:55 PM
Re: Oracle Sequence
You get gaps in sequence when the cache option is set. Every 'shutdown abort' causes the cached sequences to be lost. If you are particular about gaps 'create sequence' with nocache option.
Set cycle option if you want the sequence numbers to be recycled after reaching the maximum.
Coming back to gaps in sequence, we had got gaps even with cache option set to false when more processes were using the sequence.nextval, oracle seems to be allocating sequences to processes in bulk though I am not sure.
Hope this helps
...BPK...