Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • To see how much time or progress of long transaction Oracle
  • Search and replace pattern Linux/Unix
  • How To Transfer Passwords Between Databases (ref note: 199582.1) Oracle
  • Distributed Transaction Troubleshooting. Oracle
  • Oracle Release Explaination Oracle
  • 272332.1 CRS 10g Diagnostic Collection Guide Oracle
  • How to find the real execution plan and binds used in that explain plan in Oracle 10g?? Oracle
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix
  • Recovering lost SYS password Oracle
  • Add new columns in dataframe Python/PySpark
  • Find long Running Transaction Linux/Unix
  • Adding addidional hard drive and attach it to a linux box. Linux/Unix
  • 339939.1 Running Cluster Verification Utility to Diagnose Install Problems Oracle
  • Jai Shree Ram Oracle
  • scripts to take listener.log backup Linux/Unix

Caching sequence in Memory

Posted on 14-Sep-2009 By Admin No Comments on Caching sequence in Memory

ALTER SEQUENCE CS.SESSION_ACTIVE_SEQ_ID CACHE 2000;

exec sys.DBMS_SHARED_POOL.KEEP(‘CS.SESSION_ACTIVE_SEQ_ID ‘, ‘Q’) =>> To pin the sequence using the DMBS_SHARED_POOL.KEEP procedure (IF NEEDED)

Potential drawbacks

Setting a cache size larger then 0 can result in the loss of sequence values if the system is shutdown abruptly. When the system fails, the values that were preserved in memory are lost to the sequence.

For example, assume a sequence has been created with a cache size of 100. The first time the sequence is used, Oracle caches values 1 – 100 in memory. Subsequently, Oracle sessions use the cached information and use values 1 – 45. At this point the Oracle shuts down abruptly. When the sequence is used after start up, Oracle caches values 101 – 200 in memory, resulting in values 46 – 100 being lost.

Additionally, sequence values that have been cached in the Shared Pool can be aged out of memory depending on the activity of the database. To avoid aging out a sequence, pin the sequence using the DMBS_SHARED_POOL.KEEP procedure

Oracle, SQL scripts

Post navigation

Previous Post: Remove DOS CR/LFs (^M)
Next Post: cp_filesystem.sql

Related Posts

  • create PLAN_TABLE command. Oracle
  • Pending Distributed Transations Oracle
  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • Oracle Data Direct to TAPE Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • Standby Database File Management in 10g with STANDBY_FILE_MANAGEMENT Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (387)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (336)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024
  • Add new columns in dataframe30-Sep-2023

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Multiple listeners Oracle
  • export import with parameter file. Oracle
  • Find long Running Transaction Linux/Unix
  • get_aix_vmstat.ksh Oracle
  • find_string_in_database.sql Oracle
  • Example of How To Resize the Online Redo Logfiles Note:1035935.6 Oracle
  • DBA_HIST_SQLSTAT contents Oracle
  • online_bkup.sql Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme