Oracle Ar Invoice Numbering Sequence alter to avoid missing in between by cache

1) Query up your invoice source , which user have reported Jump in number.
Navigate>Setup>Invoice>Source
2) Execute the following script using your source as in step 1.
  1.  
  2. SELECT batch_source_id, org_id, name FROM ra_batch_sources_all WHERE name LIKE '<source>';
  3.  
or use this query if you have access from database.
  1.  
  2. SELECT 'alter sequence AR.'||seq.sequence_name||' nocache;' FROM
  3. (SELECT
  4. name bsname, org_id org,
  5. 'RA_TRX_NUMBER_'||BATCH_SOURCE_ID||'_'||org_id||'_S' seqname
  6. FROM RA_batch_sources_all) src,
  7. dba_sequences seq
  8. WHERE src.seqname=seq.sequence_name
  9. AND seq.cache_size;
  10. ORDER BY org
  11. /
  12.  
  13.  
3) Using the batch_source_id from the above query , execute the followingscript:
  1.  
  2. SELECT sequence_owner, sequence_name, cache_size
  3. FROM all_sequences
  4. WHERE sequence_name LIKE 'RA_TRX_NUMBER%1146%';
  5.  
  6.  
4) Execute the following:
  1.  
  2. ALTER sequence SEQUENCE_NAME increment BY 1 nocache;
  3. COMMIT;
  4.  
  5.  
Example, if your sequnce is RA_TRX_NUMBER_1146_1166_S
then script would be
  1.  
  2. ALTER sequence RA_TRX_NUMBER_1146_1166_S increment BY 1 nocache;
  3.  

Comments

  1. Great blog.you put Good stuff.All the topics were explained briefly.so quickly understand for me.I am waiting for your next fantastic blog.Thanks for sharing.Any coures related details learn...
    Best Quoting Software

    ReplyDelete

Post a Comment

Popular posts from this blog

Oracle Shipping Network SQL Query

Advance Supply Chaining Scripts - ASCP Full Pegging Concept Script