Листинг 3. Закрепление всех пакетов в кеше.




declare 

own varchar2(100); 

nam varchar2(100); 

cursor pkgs is 

	select	owner, object_name 

	from	dba_objects 

	where	object_type = 'PACKAGE'; 

begin 

	open pkgs; 

	loop 

		fetch pkgs into own, nam; 

		exit when pkgs%notfound; 

		dbms_shared_pool.keep(own || '.' || nam, 'P'); 

	end loop;

end;