HOW TO

Pin Oracle objects in the shared pool to improve performance

Last Published: April 25, 2020

Summary

Pinning database objects in Oracle's shared pool can improve database performance. It is recommended that all ESRI stored procedures and sequences be pinned. Once objects reside in Oracle's shared pool, they do not need to be parsed, which saves considerable resources.

Pinning objects in the shared pool uses available memory that might otherwise be used for other processes that share the pool. Allocate the additional memory to the shared pool as needed. In general, do not pin objects that are rarely used; this could have the adverse affect on database performance.

Procedure



  1. Before pinning database objects, create the SYS package that pins the objects in the shared pool. As the SYS user in SQL*Plus, execute the dbmspool.sql script located under the $ORACLE_HOME/rdbms/admin directory.

    Optionally, it is possible to grant execute privileges to the new DBMS_SHARED_POOL package to users who will need to pin objects. For example, to grant these privileges to the SDE user:

    Code:
    GRANT execute ON dbms_shared_pool TO sde;

  2. Begin pinning objects in the shared pool.

    Code:
    EXECUTE dbms_shared_pool.keep ('STANDARD', 'P');

    As a general rule, always pin the following packages owned by SYS:

       STANDARD 
    DBMS_STANDARD
    DBMS_UTILITY
    DBMS_DESCRIBE
    DBMS_OUTPUT

    Pinning other SYS packages that are often used, such as DBMS_LOCK and DBMS_ALERT, may be desired.
  3. As the SDE user, pin the objects that the application frequently uses.

    Code:
    EXECUTE dbms_shared_pool.keep ('VERSION_UTIL', 'P');


    Code:
    EXECUTE dbms_shared_pool.keep ('LOCK_UTIL', 'P');

    Database objects are not limited to stored procedures. Database sequences, triggers, and cursors can all be pinned in the shared pool. ESRI recommends pinning frequently used sequences as well.

    Code:
    EXECUTE dbms_shared_pool.keep ('SDE.CONNECTION_ID_GENERATOR', 'Q');


    Note:
    Database objects have to be pinned after each instance startup, and ideally, immediately after the startup.

    Note:
    Portions of this article are from Oracle's Documentation. It is not intended to replace or supersede Oracle documentation. Please refer to Oracle documentation for additional information and further clarifications.

Article ID:000004490

Software:
  • Legacy Products

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options