Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Error ORA-04031: unable to allocate 288 bytes of shared memory
Vijay Vardhineni wrote:
>
> Make sure that your database has a large SGA. If possible, convert your
> code into a pl/sql package, and PIN it in the SGA.
I recently had this type of problem (not enough RAM in the Shared pool). To be very explicit about the fix:
SVRMGRL> BEGIN
DBMS_SHARED_POOL.KEEP ('my_package_name'); END;
You can check that the PL/SQL package is "really" pinned in memory:
SET SERVEROUTPUT ON;
BEGIN
DBMS_SHARED_POOL.SIZES(1);
END;
You should see your package scroll by, flagged as 'Pinned'.
If there are too many lines of output increase the argument to the SIZES command:
DBMS_SHARED_POOL.SIZES(10); -- shows everything bigger than 10KB
Good luck..... and buy more RAM!
-Denis Received on Tue Jan 07 1997 - 00:00:00 CST