Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Where's the application server support matrix for JDev 10.1.2?

300877Jan 11 2005 — edited Jan 19 2005
The following URL gives a support matrix but only covers versions up to 9.0.5.

http://www.oracle.com/technology/products/jdev/collateral/papers/10g/as_supportmatrix.html

Where can I find a similar document for 10.1.2?

I can't find this on MetaLink either - in fact there doesn't seem to be anything there for 10.1.2. (CM anyone?)

My basic question is that if we're moving from JDev 9.0.5 to 10.1.2 does this require any upgrades or patches to 10g AS? The release notes with JDev 10.1.2 are not helpful in this respect.

Thanks.

Comments

L. Fernigrini

The way sequences work, when you use the CACHE option, the first time you use a number for the sequence, Oracle will return the first number to you, it will be incremented by 5000 (in your example) the lates used value on the sequence definition, and will store the 4999 remaining unused numbers in memory (cache).

The next time you ask for a number to the sequence, rather than searching from it on the definition adding one, and saving again the sequence definition, Oracle just return the next available value from the cache, making thing notable quicker.

The "bad" thing is, since those values are in memory, if the instance is shut down (normally or abnormally) those values are lost. That's the expected behavior.

The next time the sequence is used after an instance restart, it will get the value from the definition, add 5000 and save it, return the first one and store the other 4999 in the cache.

Instance shutdown is not something frequent and you should not worry about that, also sequence should be used (my opinion) to create PK (surrogate keys) values that are not shown to final users, so there should be no issues in having some gaps from time to time (the same would happen if you rollback a transaction, the sequence value is lost and gap is generated). Sequences are not gap-less.

jflack

You know that a shutdown and startup will lose cached sequences.  Export and Import can also reload the sequence cache. But why do you care?  Oracle makes clear that values generated by sequences can be generated out of order and can skip numbers.  The only guarantee is that you get a new unique number every time you read NEXTVAL.  Which is perfect for generating surrogate primary keys.  If you care, then DON'T use sequences, but accept the performance hit that you'll take for using any other method for generating sequential values.

Sven W.

L. Fernigrini wrote:

...

The "bad" thing is, since those values are in memory, if the instance is shut down (normally or abnormally) those values are lost. That's the expected behavior.

...

That is not correct.

A normal shutdown, a shutdown transactional and a shutdown immediate will NOT loose the cached sequence values (unless you are in a very old database version like Oracle 7).

Only a SHUTDOWN ABORT will loose the cache.

To the OP: I recently wrote about some further ideas why IDs sometimes are or seems to be lost:

https://svenweller.wordpress.com/2019/08/20/some-quick-facts-about-sequence-caches-and-gaps-in-ids/

The most common reason is when a sequence ages out of the shared pool. You can either keep the sequence pinned in the shared pool or increase your shared pool size.

L. Fernigrini

Well, i kind of remember seeing that on 9i (9.2.0.7), but I may be wrong, I never cared a lot about gaps.

If normal shutdowns save the last used value then the chances of having gaps with sequences is not very common.

I've read you post, it's really interesting, I will test the pin option ASAP

Sven W.

L. Fernigrini wrote:

Well, i kind of remember seeing that on 9i (9.2.0.7), but I may be wrong, I never cared a lot about gaps.

If normal shutdowns save the last used value then the chances of having gaps with sequences is not very common.

I've read you post, it's really interesting, I will test the pin option ASAP

I know the behaviour during shutdown is documented somewhere in detail, but I just looked for 15 min and could not find it.

My point is we should not care about small gaps, but we should care about frequent large gaps.

Those kind of gaps are an indication that something is sub-optimal with our system.

And this is excatly what OP seems to be doing.

-- Edit:

Also I feel he need to add. If you do a normal or transactional shutdown on a RAC, then cached values probably might be lost.

The reason is, that during shutdown the last value needs to be persisted. And in that case I expect that the highest used value from one node is used. Which also means the cached values from the other node will be lost.

Shamed H

Thank you for your reply ... And you are almost to the problem statemnt that I have posted !! The shared pool flush also will reset the CACHE for sequence I have one more , If we provide any GRANT on the seqience to other schema , will that also reset the CACHE ? We did a test on this and we found it is retesting the CACHE , if the first CACHED sequence is used atleast by one. I am not sure this is also a cuase for the sequence GAP

Sven W.
Answer

Shamed H wrote:

Thank you for your reply ... And you are almost to the problem statemnt that I have posted !! The shared pool flush also will reset the CACHE for sequence I have one more , If we provide any GRANT on the seqience to other schema , will that also reset the CACHE ? We did a test on this and we found it is retesting the CACHE , if the first CACHED sequence is used atleast by one. I am not sure this is also a cuase for the sequence GAP

Yes ALTER SYSTEM FLUSH SHARED POOL will also loose the cached values. Are you flushing the shared pool frequently? Why?
I would not expect a GRANT on a sequence to loose the sequence cache. I did NOT test it thou. Can you share how you tested it?

Marked as Answer by Shamed H · Sep 27 2020
Shamed H

Thanks Sven. I was using the Alter command to forward the sequence to some speficif number and then I was granting to other users. I was thinking the grant is making the CACHED lost , but I understand from testing that the ALTER comment is making the cache lose , rather then the grant

Sven W.

Depending on your exact database version here is a nice little (undocumented) trick to reset a sequence:

ALTER SEQUENCE mySeq RESTART START WITH yourNewValue;

This should work in 12.2.0.1 already.

1 - 9
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 16 2005
Added on Jan 11 2005
7 comments
184 views