Re: Which packages to pin

  • From: Thomas Day <tomday2@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 13 Jul 2005 15:28:11 -0400

This creates an after startup trigger that will pin SYS owned packages
in the shared pool.  This is usually sufficient to prevent pool
fragmentation, at least in my experience it has been.  Of course, your
milage may vary.  As in all things Oracle - "It depends".

SELECT 'create or replace trigger sys.pin_db_objects' FROM DUAL;
SELECT 'after startup on database' FROM DUAL;
SELECT 'begin' FROM DUAL;
SELECT UNIQUE('sys.dbms_shared_pool.keep('''||OWNER||'.'||NAME||''');')
  FROM v$db_object_cache
 WHERE type LIKE 'PACK%' and OWNER LIKE '%SYS%'
/
SELECT 'end;' FROM DUAL;
SELECT '/' FROM DUAL;
--
//www.freelists.org/webpage/oracle-l

Other related posts: