Diagnosing ORA-04031 on Oracle9iR2

Hi
We're running an Oracle9iR2 (9.2.0.6) database on Red Hat Enterprise Linux 4.0 (IA32). The database is used for development and testing. It's been running ok until recently users started getting the following error when trying to connect to the database:
ORA-04031: unable to allocate 17168 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","session param values")
What's changed during the last weeks is that we've installed Oracle10gR2 and the Oracle Calendar server on the machine, and added a about 10-20 new user accounts.
The server was originally running in dedicated server mode until i noticed there were 115 Oracle processes running on the server at one moment. The database typically has large number of connections which are idle most of the time. I changed it to shared server mode in order to avoid the overhead of having lots of server processes which are doing nothing most of the time.
I also increased the shared_pool_size and large_pool_size on the server but i'm still seeing ORA-04031 errors in trace files. How do i determine whether the cause is shared or large pool? How do i determine the right sizes for these pools? The traces include heap dumps for large pool.
The SQL query appearing in the trace files cursor name section is just one type of SQL query in most of the cases. How can i debug shared memory usage for a particular SQL query so that i can try and modify it to a more memory economic direction?
br. aspa

Hi,
If you have access to metalink, I advise you to read 146599.1 Diagnosing and Resolving Error ORA-04031.
The SQL query appearing in the trace files cursor name section is just one type of SQL
query in most of the cases. How can i debug shared memory usage for a particular SQL
query so that i can try and modify it to a more memory economic direction?The following SQL can show you statements with literal values or candidates to include bind variables:
SELECT substr(sql_text,1,40) "SQL",
count(*) ,
sum(executions) "TotExecs"
FROM v$sqlarea
WHERE executions < 5
GROUP BY substr(sql_text,1,40)
HAVING count(*) > 30
ORDER BY 2;Note: The number "30" in the having section of the statement can be adjusted as needed to get more detailed information.
There is a fixed table called x$ksmlru that tracks allocations in the shared pool that cause other objects in the shared pool to be aged out. This fixed table can be used to identify what is causing the large allocation.
SELECT * FROM X$KSMLRU WHERE ksmlrsiz > 0;Note : This view can only be queried by connected as the SYS.
How have you RAM ?
Since your last install, perhaps your RAM is not sufficient any more ?
Check your memory occupation.
Nicolas.
How do i determine whether the cause is shared or large pool? If there is no free memory into large pool left when a request is made then an ORA-4031 will be signalled similar to this : ORA-04031: unable to allocate XXXX bytes of shared memory
("large pool","unknown object","session heap","frame")
Message was edited by:
N. Gasparotto

Similar Messages

  • ORA-12853 and ORA-04031 simultaneously

    Hello,
    I am getting the following errors when I try to start Oracle
    ORA-12853: insufficient memory for PX buffers: current 0K, max needed 2640K
    ORA-04031: unable to allocate 21544 bytes of shared memory ("large pool","unknown object","large pool","PX msg pool")
    My init.ora file is as follows -
    EDA.__db_cache_size=1174405120
    EDA.__java_pool_size=33554432
    EDA.__large_pool_size=0
    EDA.__shared_pool_size=1174405120
    EDA.__streams_pool_size=0
    *._OPTIM_PEEK_USER_BINDS=FALSE
    *.background_dump_dest='/oracle/EDA/saptrace/background'
    *.compatible='10.2.0'
    *.control_file_record_keep_time=30
    *.control_files='/oracle/EDA/origlogA/cntrl/cntlrEDA.dbf','/oracle/EDA/origlogB/cntrl/cntrlEDA.dbf','/oracle/EDA/sapdata1/cntrl/cntrlEDA.dbf'
    *.core_dump_dest='/oracle/EDA/saptrace/background'
    *.db_block_size=8192
    *.db_cache_size=1159641169
    *.db_files=254
    *.db_name='EDA'
    *.dml_locks=4000
    *.event='10191 trace name context forever, level 1'
    *.FILESYSTEMIO_OPTIONS='setall'
    *.job_queue_processes=1
    *.log_archive_dest='/oracle/EDA/oraarch/EDAarch'
    *.log_buffer=1048576
    *.log_checkpoint_interval=0
    *.log_checkpoints_to_alert=true
    *.open_cursors=800
    *.optimizer_features_enable='10.2.0.1'
    *.pga_aggregate_target=1546188226
    *.processes=80
    *.recyclebin='off'
    *.remote_login_passwordfile='exclusive'
    *.remote_os_authent=true
    *.sessions=96
    *.sga_max_size=2319282339
    *.sga_target=2399141888
    *.shared_pool_reserved_size=115964116
    *.shared_pool_size=1159641169
    *.sort_area_retained_size=0
    *.sort_area_size=2097152
    *.statistics_level='typical'
    *.undo_management='AUTO'
    *.undo_retention=43200
    *.undo_tablespace='PSAPUNDO'
    *.user_dump_dest='/oracle/EDA/saptrace/usertrace'
    *.workarea_size_policy='AUTO'
    According to me everything looks fine. Kindly help me sort this error.
    Thanks in advance.

    1. Play with Shared Pool....
    a. The following query determines the available memory for SHARED_POOL_SIZE in Oracle sga
    select sum (bytes)/1024/1024 from v$sgastat where pool=u2019shared poolu2019
    b. The following query determines the total used memory by shared_Pool in Oracle SGA.
    select sum (bytes)/1024/1024 from v$sgastat where pool=u2019shared poolu2019 and name not in (u2019free memoryu2019)
    c. This is the most important query
    select
    sum(a.bytes)/(1024*1024))shared_pool_used,
    max(b.value)/(1024*1024) shared_pool_size,
    sum(a.bytes)/(1024*1024))-
    (sum(a.bytes)/(1024*1024)) shared_pool_avail,
    ((sum(a.bytes)/(10241024))/(max(b.value)/(10241024)))*100
    pct_shared_pool_avl
    from v$sgastat a, v$parameter b
    where (a.pool=u2019shared poolu2019
    and a.name not in (u2019free memoryu2019))
    and
    b.name=u2019shared_pool_sizeu2019
    You need to continously monitor the shared Pool with the above query at differnet times. During Peak times and Non peak times to have glance of shared pool usage in the Oracle database.
    if the available pct_shared_pool_avl crosses 95% then i think you should re-consider the Process of increasing the shared_pool_size.
    2. There are many way to improve Shared Pool performance.
    a. Ask ABAPers to write more generic and reusablecode.
    b. Using of right block size.
    c. Proper design of the database.
    Comment on ORA-04031 :
    This error should not appear in any of the application logs, the alert log or any trace files. Do not depend on ORA-04031 errors being written to the alert log, as 4031 errors only appear in the alert log if they affect background process operations (such as PMON activities). 4031u2019s are not internal errors and so could be trapped and handled by the application (this is not recommended).
    From 10gR1 onwards, a 4031 trace file is written to the user_dump_dest (or background_dump_dest) directory; this trace file is useful in diagnosing the nature of problem
    Hope this will help you.
    Regards,
    SK
    OCP DBA -9i,10g

  • ORA-04031: unable to allocate 33568 bytes of shared memory  in Oracle 10g

    Hi,
    I am getting following message frequently while taking export in Oracle 10g database:-
    EXP-00008: ORACLE error 4031 encountered
    ORA-04031: unable to allocate 33568 bytes of shared memory ("shared pool","DBMS_REPCAT_UTL","PL/SQL MPCODE","BAMIMA: Bam Buffer")
    ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_REPCAT_UTL"
    ORA-06512: at "SYS.DBMS_REPCAT_EXP", line 87
    ORA-06512: at line 1
    EXP-00083: The previous problem occurred when calling SYS.DBMS_REPCAT_EXP.schema_info_exp
    EXP-00008: ORACLE error 4031 encountered
    ORA-04031: unable to allocate 16416 bytes of shared memory ("shared pool","SELECT SYNNAM, SYNNAM, SYNTA...","kgghtInit","kgghtInit")
    EXP-00000: Export terminated unsuccessfully
    Whats could be the reason?

    There could be a few reasons causing the problem. From literal message it would look like your shared pool size is small and you need to increase. But the root cause of the problem is a little more complicated than that. I suggest you read metalink doc
    Diagnosing and Resolving Error ORA-04031
    Doc ID: Note:146599.1

  • ORA-04031 while creating index

    Hi,
    I am creating a schema using IMP utility.
    The import log is showing error (during index creation)
    ORA-04031: unable to allocate 2064 bytes of shared memory ("shared pool","unknown object","sga heap","multiblock rea")
    This is a Oracle 8 (8.1.7.4.0) database. Exports were taken from Oracle 7 and are being imported into Oracle 8.
    Please guide me. I have never worked in such older versions. Below are some details
    SQL> select * from v$sgastat;
    POOL NAME BYTES
    fixed_sga 73888
    db_block_buffers 4505600
    log_buffer 66560
    shared pool free memory 2120444
    shared pool miscellaneous 494960
    shared pool PLS non-lib hp 2096
    shared pool KGFF heap 61212
    shared pool KGK heap 4248
    shared pool KQLS heap 425692
    shared pool trigger inform 120
    shared pool Checkpoint queue 28944
    POOL NAME BYTES
    shared pool latch nowait fails or sle 37632
    shared pool kcb where/why stats array 29376
    shared pool message pool freequeue 124552
    shared pool sessions 366520
    shared pool transactions 166804
    shared pool State objects 188224
    shared pool branches 45120
    shared pool simulator trace entries 80000
    shared pool enqueue_resources 34200
    shared pool long op statistics array 74800
    shared pool PL/SQL DIANA 525652
    POOL NAME BYTES
    shared pool db_files 36272
    shared pool ktlbk state objects 80036
    shared pool dictionary cache 711268
    shared pool table columns 17148
    shared pool java static objs 30560
    shared pool PL/SQL MPCODE 90204
    shared pool fixed allocation callback 1920
    shared pool library cache 1128364
    shared pool db_handles 75000
    shared pool sql area 2040852
    shared pool db_block_buffers 74800
    POOL NAME BYTES
    shared pool processes 119400
    shared pool SYSTEM PARAMETERS 63604
    shared pool transaction_branches 33856
    shared pool event statistics per sess 590240
    java pool free memory 20000768
    Please guide.
    Regards,
    SID

    Hi SID;
    Please see below notes:
    Diagnosing and Resolving Error ORA-04031 on the Shared Pool or Other Memory Pools [Video] [ID 146599.1]
    OERR: ORA 4031 "unable to allocate %s bytes of shared memory ("%s","%s","%s")" [ID 4031.1]
    Regard
    Helios

  • Increase Shared Pool for erorr # ORA-04031

    hi,
    what do i need to look at before i increase the shared pool of our database?
    there is just the one database instance on the machine.
    i am concerned about the repurcussions on the server.
    i hope the information below is of help.
    db version: 10.2.0.1.0
    os: Red Hat Linux 3
    SQL> select name, value from v$parameter where name like '%pool%';
    name value
    shared_pool_size 150994944
    large_pool_size 33554432
    java_pool_size 50331648
    streams_pool_size 0
    shared_pool_reserved_size 10066329
    buffer_pool_keep
    buffer_pool_recycle
    global_context_pool_size
    olap_page_pool_size 0
    thanks,
    santosh sewlal

    Hi Santosh,
    This is what i faced last two days back! Now i am monitoring the Issue! If you got any solutions please let me know how to avoid this!
    ORA-04031 error can be due to either an inadequeate sizing of the SHARED POOL size or due to heavy
    fragmentation leading the database to not finding large enough chuncks of memory.
    You can monitor this with the two events...
    alter system set events '4031 trace name errorstack level 3';
    alter system set events '4031 trace name heapdump level 3';
    Fragmentataion is one of the causes of ora 4031
    Please refer these.
    1.Article-ID: Note 146599.1
    Title: Diagnosing and Resolving Error ORA-04031
    2.Article-ID: Note 62143.1
    Title: Understanding and Tuning the Shared Pool
    3.Article-ID: Note 61623.1
    This is paticular for Oracle 9i Rel 2, Hope the same for Oracle 10 G
    Regards
    Ravi

  • ORA-00604: error occurred at recursive SQL level 1 + ORA-04031

    Hi,
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Solaris: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    os version : SunOS oratest 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Fire-V210
    SQL> show parameter  sga_target
    NAME                                 TYPE        VALUE
    sga_target                           big integer 892M
    SQL> show parameter shared_pool_size
    NAME                                 TYPE        VALUE
    shared_pool_size                     big integer 112M
    when i do normal query i am getting ora-04031 error and 10g server is Automatic Shared Memory Management since i set sga_target and server as to do automatically readjusts the sizes of memory pools, if that is the case why it throwing ora-04031 error;
    below errors showing before bounce the database
    SQL> show parameter size
    ORA-04031: unable to allocate 3840 bytes of shared memory ("shared
    pool","unknown object","sga heap(1,0)","kglsim object batch")
    SQL> select * from tab
      2  ;
    select * from tab
    ERROR at line 1:
    ORA-04031: unable to allocate 3840 bytes of shared memory ("shared
    pool","select * from tab
    ","sga heap(1,0)","kglsim object batch")
    alert log file:
    Errors in file /oracle/admin/appsdb/bdump/appsdb_smon_19154.trc:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-04031: unable to allocate 3840 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","kglsim object batc
    h")
    Thanks
    PrakashEdited by: prakashdba on Jan 10, 2009 12:31 AM
    Edited by: prakashdba on Jan 10, 2009 4:10 AM

    And your version number is?
    And your patch level is?
    And your hardware and operating system are?
    What did you find when you looked this up at metalink?
    Did you follow the advice in the metalink Knowledge Base docs?

  • Error ORA-04031 while executing a stored procedure from Pro C++ code

    I am getting the error ORA-04031(Unable to allocate 4096 bytes of shared memory("Shared Pool",.....)) while trying to execute a stored procedure from my pro*C application. This happens only after a few hours since the application has been running. I am closing the cursor after every database call.
    Does anyone know why it is happening and any possible solutions?
    TIA
    Srithaj.

    One thing that can be done is to flush the shared pool before starting the application.
    alter system flush shared pool;
    Another is to increase the shared pool size by setting the parameter shared_pool_size in init_sid.ora file.
    null

  • Urgent help with memory issue (ORA-04031)

    Hi Geeks,
    Came Across this below error in alert log in of our databases. Interestingly this error only pops up while the database backup runs. Below are the memory parameters.
    memory_max_target big integer 14G
    memory_target big integer 13G
    pga_aggregate_target big integer 0
    sga_target big integer 0
    shared_pool_reserved_size big integer 192M
    shared_pool_size big integer 0
    ORA-04031: unable to allocate 5792 bytes of shared memory
    ("shared pool","unknown object","sga heap(1,1)","ges resource ")
    Errors in file /apps/opt/oracle/diag/asm/+asm/+ASM1/trace/+ASM1_lmd0_14123.trc
    I have tried specifying a value to shared_pool_size but with no luck..!! Pls help. I am not sure how to resolve this.

    Hi, ORA-4031 in this case can be caused by unrestricted growth of the PGA, thus forcefully reducing the SGA.
    We've had this in the past also.
    The solution is in older versions to increase the shared_pool_size as you mentioned but with ASMM, this is no longer an option. You can however retrict the growth of the PGA by setting SGA_TARGET.
    On our system this now looks like:
    SQL> show parameter _target
    NAME                                 TYPE                 VALUE
    db_flashback_retention_target        integer              1440
    memory_max_target                    big integer          10G
    memory_target                        big integer          10G
    pga_aggregate_target                 big integer          0
    sga_target                           big integer          8GSee how we in fact set the max growth of the PGA to 2Gb ( 10Gb - 8Gb)
    Try this and see if ot works for you also
    Success!!
    FJFranken

  • SAP BW with ORA-04031 Errors

    Hello All,
    Context:
    We have a financial closing system working in the BW 3.5 and Oracle 9.2.0.7.0.
    We are working with more than 100 millions records in 3 days.
    In general, the system uses the standard data marts and BPS processes (copy, distribution, etc).
    Error:
    We had a lot of ORA-04031 errors for all execution (ABAP Programs, Data Loads, BPS Executions), it stopped the environment.
    We did the "stop/start" the server to solved the problem.
    The basis team increase the parameter "shared_pool_size" = 3000M - We saw the SAP Note (690241) and which is more than enough.
    We have fear about it, we think it is posible to occurs again.
    This is a big impact for the business.
    Have you got this error in the past?
    Could you please help us.
    Thanks a lot.
    Daniel Souza
    SAP BW, SEM and Portal Consultant.
    São Paulo - Brazil
    +55 11 99092151

    Hi Chandran,
    We saw this note.
    The basis team have been changed the KGHDSIDXCOUNT parameter ( 4 to 1).
    I am not founding more causes for this problem in the note.
    Is it posible to have problems if the DB_CACHE_SIZE parameter is very large? example 18000M?
    The basis team reduces the value for 1700M, in the last shutdown.
    How can I flush the memory automatically?
    The basis team reported this error for us. "It is not posible to flush the memory, it is necessary to shutdown the server".
    Is it posible for the oracle 9i manage the memory area (shared pool) automatically? Is it recommended? Have you got this experience?
    We have seen two notes about it:
    997889 --> "Increase the memory SGA the ocurrence of error ORA-04031 but it does not prevent it."
    617416 --> "The following areas of the SGA can be changed dynamically with Oracle 9.2 if the SGA is configured dynamically: Buffer Cache, Shared Pool, Large Pool."
    Thanks a lot.
    Best regards,
    Daniel Souza
    São Paulo - Brazil

  • ORA-04031: unable to allocate 64 bytes of shared memory

    Hi All,
    We are performing System copy on a distributed environment with OS Windows 2003 and DB Oracle 10.2.0.4
    While importing the Database (ABAP) only ,we are facing error and 5 import steps are failing  in Import ABAP phase.
    Error is "ORA-00604: error occurred at recursive SQL level 1
    ORA-04031: unable to allocate 4120 bytes of shared memory ("shared pool","select user#,type# from user...","Typecheck","kgghteInit")
    (DB) INFO: disconnected from DB"
    There is already one Oracel Instance OracleXX1 is runing this is the second instance and the server has around 1.75 GB RAM...i
    Can you please suggest what could be the error.
    Regards
    Ajay

    Dears,
    Please try increase your database parameter shared_pool_size in pfile and then try to resume the activity.
    Regards,
    Shivam

  • ORA-04031-----capture aborat in stream in oracle 10g R2 in win 2003

    Hi Experts,
    Error Message ORA-04031: unable to allocate 116 bytes of shared memory ("streams pool","unknown object","streams pool","kolcalm coll")
    I got this message for capture ABORTED. my sga_target and sga_max as 1880M. Do I need to increase their size? stream pool size as 880. shared_pool_reserved_size as 14M.
    Based on oracle document for this error message:
    Action: If the shared pool is out of memory, either use the dbms_shared_pool package to pin large packages, reduce your use of shared memory, or increase the amount of available shared memory by increasing the value of the INIT.ORA parameters "shared_pool_reserved_size" and "shared_pool_size". If the large pool is out of memory, increase the INIT.ORA parameter "large_pool_size".
    Key point: we use asm to control. it include share_pool and large_pool. Do we need to increase share pool size?
    Or we need to take other steps to handle this point.
    Thanks for help!!
    regards
    Jim
    Edited by: user589812 on Nov 24, 2008 9:02 AM

    Sorry. I use Oracle 10GR2 in window 2003
    For you sql results as
    STREAMS_POOL_SIZE_FOR_ESTIMATE STREAMS_POOL_SIZE_FACTOR ESTD_SPILL_COUNT ESTD_SPILL_TIME ESTD_UNSPILL_COUNT ESTD_UNSPILL_TIME
    272 .1828 66034094 49261 72443892 114732
    424 .2849 56899900 42916 69761439 110546
    576 .3871 29490067 17904 56631824 87657
    728 .4892 23989724 13951 55330937 85704
    880 .5914 20168762 11552 54131928 83935
    1032 .6935 16931737 9668 52998667 82269
    1184 .7957 14147340 8134 51948431 80724
    1336 .8978 11706951 6797 51052796 79408
    1488 1 9679293 5687 50314492 78322
    1640 1.1022 8051240 4800 49768913 77520
    1792 1.2043 6747253 4087 49361033 76921
    STREAMS_POOL_SIZE_FOR_ESTIMATE STREAMS_POOL_SIZE_FACTOR ESTD_SPILL_COUNT ESTD_SPILL_TIME ESTD_UNSPILL_COUNT ESTD_UNSPILL_TIME
    1944 1.3065 5699093 3515 49064019 76483
    2096 1.4086 4829584 3040 48850903 76171
    2248 1.5108 4089840 2638 48682591 75923
    2400 1.6129 3425461 2278 48542520 75717
    2552 1.7151 2815554 1949 48417853 75535
    2704 1.8172 2267859 1648 48297317 75357
    2856 1.9194 1865779 1427 48178756 75183
    3008 2.0215 1678078 1315 48063018 75014
    3160 2.1237 1637930 1277 47943171 74838
    I am waiting for your help!
    JIm

  • ORA-04031: unable to allocate 4096 bytes if shared memory

    Hello Gurus,
    Did anyone got this type of error before:
    ERROR:
    ORA-20414: Materialized View refresh failed - ORA-12008: error in materialized view refresh path
    ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool","IDX_MIF_SITE","pacdHds_kkpaco","stP_kkpacd: kkpodPacdInit")
    Every sunday full refresh of the data warehouse is scheduled. This sunday it didn't complete and gave us the above error. This can be solved by increasing the shared pool memory size. But DBA doesnot want to increase it every sunday(This has been going on for 3 weeks now) and it's not feasible to increase like this everytime.
    We want to find the actual cause of it and fix?
    Does anyone know the solution or can throw some light on this issue?
    Thanks,
    Sanjay

    We want to find the actual cause of it and fix?The cause is simple - you have run out of memory assigned to the Shared Pool in the SGA.
    The root cause is more of an issue. The Shared Pool is mostly used for keeping the SQL statements and supporting information (such as cursor support). Each unique SQL statement requires it's own area in the shared pool, however identical statements can used the same (shared) area. Shared Pool is also used to store the 'current' data dictionary (table, view, etc.) information. And in some cases, it's also used for 'large' operations such as direct path insert block builds.
    Some of the possible reasons for running out of shared pool might include
    - it's simply undersized;
    - not enough SQL is actually shareable;
    - the large pool has not been allocated.
    That second one is frequent when the application builds up SQL statements by concatenating pieces, including literals (user input) and then executing the unique statement. This is a common technique by developers using .Net, Perl or having SQL Server background. (That mode of operation is very susceptible to SQL Injection.)
    You can get a lot more info from:
    - searching the forum;
    - looking in the docco (Concepts manual and Performance Tuning guide);
    - books, like Tom Kyte's "Expert One on One Oracle", "Effective Oracle By Design", and newer on apress.com

  • ORA-00604, ORA-04031

    How can I handle this error message?
    ERROR:
    ORA-00604: error occurred at recursive SQL level 2
    ORA-04031: unable to allocate 4048 bytes of shared memory ("shared pool","TRIGGER$","sga heap","state objects")
    ORA-00604: error occured at recursive SQL levle1
    ORA-04031: unable to allocate 4048 bytes of shred memory
    ("shared pool","unknown object","sga heap","state objects")
    I changed shared_pool_size.
    Initial shared_pool_size is 52428800
    and I changed it to 1500000000.
    Isn't 150M enough?
    Should I have to set shared_pool_size to lager size?
    Or is there any other way to fix this problem?
    Oracle Version is 8.1.6.
    Platform is SGI , IRIX 6.4.10+.
    Please, help me.
    Tanki

    - Use bind variables in your applications (if they are not used allready)
    - Pin larger packages (the ones you actaully use) immediately uppon database startup
    - Increase your shared pool (if it's not unreasonably large allready)
    - ALTER SYSTEM FLUSH SHARED_POOL; when you encounter ORA-4031 (this is more of a temporary workaround than a real sollution)

  • Oracle error   ORA-00604 & ORA-04031

    ORA-00604: error occurred at recursive SQL level 2
    ORA-04031: unable to allocate 4200 bytes of shared memory ("shared pool","TRIGGER$","sga heap","state objects")
    ORA-00604: error occurred at recursive SQL level 1
    ORA-04031: unable to allocate 4200 bytes of shared memory ("shared pool","unknown object","sga heap","state objects")
    plz help me to find why this error is coming . I am running Oracle8i Release 8.1.7.0.0 on windows 32 bit server. And also how to resolve it

    ORA-04031: unable to allocate string bytes of shared memory ("string","string","string","string")
    Cause:      More shared memory is needed than was allocated in the shared pool.
    Action:      If the shared pool is out of memory, either use the dbms_shared_pool package to pin large packages, reduce your use of shared memory, or increase the amount of available shared memory by increasing the value of the INIT.ORA parameters "shared_pool_reserved_size" and "shared_pool_size". If the large pool is out of memory, increase the INIT.ORA parameter "large_pool_size".
    Regards
    Asif Kabir

  • ORA-04031 Errors

    So I am running Oracle 11g and APEX 4.2.1.00.08 on an Amazon m1.medium instance. I also have it running on a Dell T300 server locally. I haven't had any issues with application on the local server, but I keep getting memory errors on the Amazon one. This is the error message " ORA-04031: unable to allocate 32792 bytes of shared memory ("large pool","unknown object","session heap","kgich") "
    I have checked the shared memory pool on both machines. Here is what "select * from v$sgainfo; " shows from both machines if that is of any use: [Amazon Machine|http://diversifiedindustries.biz/images/AmazonOracle.jpg] [Local Machine|http://diversifiedindustries.biz/images/DIOracle.jpg] I am not sure how to interpret these results as I am a noob when it comes to Oracle and Apex things.
    Any thoughts on how I can fix this?

    I had originally posted in the APEX forum and it was suggested I try here, which is why I had only put the APEX version. I know now to post everything in the future.
    jgarry wrote:
    Please show us the output of this command:
    show parameter pool
    SQL> show parameter pool
    NAME                                 TYPE        VALUE
    buffer_pool_keep                     string
    buffer_pool_recycle                  string
    global_context_pool_size             string
    java_pool_size                       big integer 0
    large_pool_size                      big integer 0
    olap_page_pool_size                  big integer 0
    shared_pool_reserved_size            big integer 8178892
    shared_pool_size                     big integer 100M
    streams_pool_size                    big integer 0
    Also, you can create a pfile from spfile, and post that.
    xe.__db_cache_size=8388608
    xe.__java_pool_size=4194304
    xe.__large_pool_size=4194304
    xe.__oracle_base='C:\oraclexe\app\oracle'#ORACLE_BASE set from environment
    xe.__pga_aggregate_target=16777216
    xe.__sga_target=192937984
    xe.__shared_io_pool_size=4194304
    xe.__shared_pool_size=163577856
    xe.__streams_pool_size=4194304
    *.audit_file_dest='C:\oraclexe\app\oracle\admin\XE\adump'
    *.compatible='11.2.0.0.0'
    *.control_files='C:\oraclexe\app\oracle\oradata\XE\control.dbf'
    *.db_name='XE'
    *.DB_RECOVERY_FILE_DEST_SIZE=10G
    *.DB_RECOVERY_FILE_DEST='C:\oraclexe\app\oracle\fast_recovery_area'
    *.diagnostic_dest='C:\oraclexe\app\oracle\.'
    *.dispatchers='(PROTOCOL=TCP) (SERVICE=XEXDB)'
    *.job_queue_processes=4
    *.memory_target=200M
    *.open_cursors=300
    *.remote_login_passwordfile='EXCLUSIVE'
    *.sessions=20
    *.shared_pool_size=104857600
    *.shared_servers=4
    *.undo_management='AUTO'
    *.undo_tablespace='UNDOTBS1'

Maybe you are looking for