Document 1665930.1
Document 1665930.1
1
Copyright (c) 2023, Oracle. All rights reserved. Oracle Confidential.
In this Document
Symptoms
Cause
Solution
References
APPLIES TO:
SYMPTOMS
On : 12.1.3 version
Have observed during the R12 implementation that the WSH_NEW_DELIVERIES_S sequence is generating delivery_ids
with large gaps.
The sequence is not always incrementing by 1 as expected. It mostly increments by 1 but then will increment by just less
than 1000.
In order to eliminate confusion and possible errors in processing shipments, the delivery_ids need to be as sequential as
possible.
The issue does not occur in the 11i instance. Users use the Shipping Transactions Form (STF) to autocreate deliveries.
The query below was used to obtain the results seen above:
STEPS
-----------------------
The issue can be reproduced as follows:
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=qg1wcrno_4&id=1665930.1 1/3
5/23/23, 3:19 PM Document 1665930.1
CAUSE
The cause for the large gaps in delivery id's is because on R12, the default value for CACHE_SIZE = 1000.
In 11i, the default value for CACHE_SIZE = 20
When pick relese is done and the flushing of objects in the Database occurs, whatever numbers which were not used are
lost.
Then when pick release or autocreating deliveires is done again, it allocates another 1000 numbers and the process
repeats.
SOLUTION
1. Please perform the alter statement in off business hours in a Test instance.
3. Then observe the performance of processes like pick release process and process deliveries SRS) for couple of days.
If everything is fine, keep the cache as 20.
Note: If the above query does not return any record, then use this:
select * from dba_sequences
where sequence_name = 'WSH_NEW_DELIVERIES_S';
SEQUENCE_OWNER = WSH
SEQUENCE_NAME = WSH_NEW_DELIVERIES_S
MIN_VALUE = 1
MAX_VALUE = 2147483647
INCREMENT_BY = 1
CYCLE_FLAG = N
ORDER_FLAG = N
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=qg1wcrno_4&id=1665930.1 2/3
5/23/23, 3:19 PM Document 1665930.1
CACHE_SIZE = 1000
LAST_NUMBER = 406457
=================================================
But if any of the below scenarios happens, the stored values will be lost:
1) If the database restarts (unlikely).
or
2) You don't use the sequence for a while and Database controls the flushing of objects in the shared pool. If the
flushing of objects happens, then you will loose the next 999 numbers which are there in the memory.
or
3) Delivery details are backordered during pick release. Pick release creates the delivery_id first, then when
insufficient quantity error is returned, the newly created delivery_id is flushed but is not re-used for another delivery
detail, see note 888113.1
Please be advised it is nearly impossible to keep the sequence GAP free. However, to control it to some extent you can
increase the size of the cache by increasing the size of the shared pool. But still be advised that even if you make your
shared pool 1000TB in size - Database is still free to flush the objects (sequence) out of the pool whenever it feels like.
=================================================
=================================================
You need to log into WSH user and then run this alter statement to alter the cache.
1) Please perform the alter statement during non-business hours.
2) Chances of overwriting the cache size are low but if there is any patch which changes the cache size of
WSH_NEW_DELIVERIES_S, then the patch can overwrite the cache size.
3) If any shipping patch is applied that has wshseq.odf as part of patch, please check if wshseq.odf has any alter to
the WSH_NEW_DELIVERIES_S.
REFERENCES
BUG:18484114 - WSH_NEW_DELIVERIES_S SEQUENCE GENERATING DELIVERY_IDS IN GAPS SINCE R12
NOTE:404526.1 - Why are Delivery Numbers Created With Gaps of 1000?
Didn't find what you are looking for?
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=qg1wcrno_4&id=1665930.1 3/3