ORA-04031: unable to allocate 32 bytes of shared memory

DB Alert log,
Errors in file /u01/fusdb/db/oracle/diag/rdbms/fusdb/fusdb/trace/fusdb_dm00_22963.trc (incident=920331):
ORA-04031: unable to allocate 32 bytes of shared memory

DB Alert log shows following error:,
Errors in file /u01/fusdb/db/oracle/diag/rdbms/fusdb/fusdb/trace/fusdb_dm00_22963.trc (incident=920331):
ORA-04031: unable to allocate 32 bytes of shared memory ("shared pool","select obj#,type#,ctime,mtim...","SQLA","tmp")
ORA-06512: at "SYS.KUPM$MCP", line 1052
ORA-06512: at line 2
Use ADRCI or Support Workbench to package the incident.
See Note 411.1 at My Oracle Support for error and packaging details.
opidrv aborting process DM00 ospid (22963) as a result of ORA-447


Solution 1: Increase Oracle Database SGA to 1Gb,
PGA to 500M
sga_max_size=1024M
pga_max_size=500M
Recycle database and re-run the program