Regarding the Pinning of the Objects in the Shared Pool

Some of the Frequently Used Packages, Procedures and Functions can be pinned
In the shared_pool Using the DBMS_SHARED_POOL Package to improve the
Performance. To create this Package Use dbmspool.sqlScript.
      BEGIN
      SYS.DBMS_SHARED_POOL.KEEP(:Package);
      END;

Since theDbms_shared_pool Package is owned by thesys and is
Available only to the Users to Whom the DBA Role is granted
So for allowing the Non DBA Users to Use this Package a Public Synonym needs to be created.

Giving Access to Some of DBA Package to the NON-DBA Users

CREATE PUBLIC SYNONYM
DBMS_SHARED_POOL FOR
DBMS_SHARED_POOL

Then Pin all the top 10 Objects Belonging to that Particular Schema. Again
Deciding this can be a bit tricky for this One needs to know the application
that is running and which are the Procedures, Functions and Queries.

To pin a Procedure or Function
EXECdbms_shared_pool.keep('FunctionName','P');
EXECdbms_shared_pool.keep('procdureName','P');

To pin a Trigger
Execute dbms_shared_pool.keep (‘< TRIGGER_NAME >’ ,’R’);

To pin a Cursor
execute dbms_shared_pool.keep (‘<ADDRESS>’,’HASH VALUE >, ‘C’);
to find out the HASH VALUE AND ADDRESS USE THE Following
select address,hash_value from v$sqlarea where sql_text
like ‘select empno,ename from scott.emp where ename=%’;

To pin a sequence
execute dbms_shared_pool.keep (‘ <sequence_name>’,’q’);

Have a Oracle Question
Do you have an Oracle Question?

Oracle Books
Oracle Certification, Database Administration, SQL, Application, Programming Reference Books

Oracle Application
Oracle Application Hints and Tips

Oracle Home
Oracle Database, SQL, Application, Programming Tips

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.
The site www.erpgreat.com is not affiliated with or endorsed by any company listed at this site.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.