Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • normal maintenance for exp-imp and renaming table Oracle
  • standard Monitoring – 1 Oracle
  • SQL Server Vs Oracle Architecture difference SQL Server
  • Nice notes on wait events Oracle
  • how to find OS block size Oracle
  • How can I tell if ASO is installed ? Oracle
  • FRA Information. Oracle
  • CPU speed on Linux Linux/Unix
  • New OFA for 11g Oracle
  • sid_wise_sql.sql Further explaination Oracle
  • Find Multiple levels of object dependencies : depen.sql Oracle
  • executing Function from SQLPLUS prompt Oracle
  • Locktree.sql Oracle
  • New Latest Param.sql for finding all hidden parameters also Oracle
  • How does one SELECT a value from a table into a Unix variable? From SQL to Shell 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

  • Difference between SYNC and AFFIRM Oracle
  • Btee and Bitmap Plans in Oracle 9i and higher Oracle
  • SQL Tracker by SID sqltrackerbysid.sql Oracle
  • TABLE SIZING WITH DB_BLOCK ARCHITECTURE Reference : Metalink note : 10640.1 Oracle
  • OEM-troubleshooting on 20-MAY-08 Oracle
  • Index Range Scan Oracle

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Renaming Oracle Instance Name Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • How to hide author name in WordPress BLOG PHP/MYSQL/Wordpress
  • newupload.html PHP/MYSQL/Wordpress
  • find_err.sql for finding errors from dba_errors. Oracle
  • Oracle Identifiers Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • upload.html PHP/MYSQL/Wordpress

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme