Call for Oracle support & training (800) 766-1884
Free Oracle Tips

Home
Corporate Oracle Training
Custom Oracle Training
Oracle New Features Training
Advanced Oracle DBA Classes
Oracle Tuning Courses
Oracle Tips & Tricks
Oracle Training Links
Oracle Training Links
Oracle Training Links

We are top for USA Oracle Training Clients

 

Free Oracle Tips


 
HTML Text AOL

Free Oracle App Server Tips


 
HTML Text

Oracle support

Oracle training

Oracle tuning

Rednecks!

Remote Oracle

Custom Oracle Training

Donald K. Burleson

Oracle Tips

 

Pinning the Oracle packages with start-up triggers

Package pinning has become a very important part of Oracle tuning, and with the introduction of system-level triggers in Oracle8i, we now have an easy tool to ensure that frequently-executed PL/SQL remains cached inside the shared pool.

Just like using the KEEP pool with the data buffer caches, the pinning of packages ensures that the specified package always remains in the Most-recently-used (MRU) end of the data buffer.  This prevents the PL/SQL from being paged-out, and then re-parsed upon reload.  The Oracle DBA controls the size of this RAM region by setting the shared_pool_size parameter to a value large enough to hold all of the PL/SQL.

Pinning of packages involves two areas:

  • Pinning frequently executed packages – Oracle performance can be greatly enhanced by pinning frequently executed packages inside the SGA.

  • Pinning the standard Oracle packages – These are shown in the code listing below, and should always be opined to prevent re-parsing by the Oracle SGA.

You can interrogate the v$db_object_cache view to see the most frequently used packages, and automatically pin them at database start-up time (with an ON DATABASE STARTUP trigger) using dbms_shared_pool.keep.

create or replace trigger

   pin_packs

       after startup on database

       begin

       dbms_shared_pool.keep('DBMS_ALERT');                                 

       dbms_shared_pool.keep('DBMS_DDL');

       dbms_shared_pool.keep('DBMS_DESCRIBE');

       dbms_shared_pool.keep('DBMS_LOCK');                         

       dbms_shared_pool.keep('DBMS_OUTPUT');

       dbms_shared_pool.keep('DBMS_PIPE');

       dbms_shared_pool.keep('DBMS_SESSION');                          

       dbms_shared_pool.keep('DBMS_SHARED_POOL');

       dbms_shared_pool.keep('DBMS_STANDARD');

       dbms_shared_pool.keep('DBMS_UTILITY');                                  

       dbms_shared_pool.keep('STANDARD');

       end;

If you like Oracle tuning, you might enjoy my latest book “Oracle Tuning: The DefinitiveReference” by Rampant TechPress. (I don’t think it is right to charge a fortune for books!) and you can buy it right now at this link:

http://www.rampant-books.com/book_1002_oracle_tuning_definitive_reference_2nd_ed.htm

 

 

 
 
 

Oracle performance tuning book

 

 

Oracle performance tuning software

 
Oracle performance tuning software
 
Oracle performance Tuning 10g reference poster
 
Oracle training in Linux commands
 
Oracle training Excel
 
 
 
 
 
email BC:


Copyright © 1996 -  2014 by Burleson Inc. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.