ORA-04031 Error

Hi All!
Can someone help me find the cause for the following error which occurs at random when I access Oracle through the servlet?
java.sql.SQLException: ORA-04031: unable to allocate 744 bytes of shared memory ("unknown object","sga heap","library cache")
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:542)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1311)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:595)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1600)
at oracle.jdbc.driver.OracleStatement.doExecute(OracleStatement.java:1758)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1805)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:410)
My environment:
In jserv.properties of my webserver
wrapper.path=.:/bin:/usr/local/bin:/mnt/sdclib/run:/usr/bin:/oracle/app/product/7.2.3/bin
wrapper.classpath=/oracle/app/product/8.1.6/jdbc/lib/classes12.zip
wrapper.env=ORACLE_REL=7.2.3
wrapper.env=ORACLE_HOME=/oracle/app/product/7.2.3
A reply in advance would be of great help to me.
Thanks,
Benjamin

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by quan wang:
Run the following command to see how to resolve the exception:
${ORACLE_HOME}/bin/oerr ora 04031<HR></BLOCKQUOTE>
Thanks very much Quan Wang!

Similar Messages

  • 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

  • How to troubleshoot ORA-04031 error?

    I'm getting ORA-04031 errors such as the this one:
    ORA-04031: unable to allocate 264 bytes of shared memory ("shared pool","unknown object","PCUR^a9c5b70f","kglob")
    Here is the server's information:
    OS: RHEL
    MEMORY: 48 GB
    There is another database on the same server.
    Here is the information about the database which has the ORA-04031 errors:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Database size (sum of datafiles) is about 2 GB.
    SGA_TARGET = 0
    SGA_MAX_SIZE = 224M -- Since SGA_TARGET = 0, does SGA_MAX_SIZE still control the maximum size of SGA?
    SHARED_POOL_SIZE = 128M
    SHARED_POOL_RESERVED_SIZE = 6710886
    LOG_BUFFER = 4890624
    LARGE_POOL_SIZE = 0
    DB_CACHE_SIZE = 64M
    DB_BLOCK_SIZE = 8192
    JAVA_POOL_SIZE = 24M
    SESSION_CACHED_CURSORS = 50
    STATISTICS_LEVEL = TYPICAL
    MEMORY_TARGET = 0
    MEMORY_MAX_TARGET = 0
    CPU_COUNT = 16
    SQL AREA has 57% GETHITRATIO, 39939 RELOADS, and 1885 INVALIDATIONS.
    Should I just increase SHARED_POOL_SIZE?
    Thanks for any help.

    is your post or mine more understandable?
    SHARED_POOL_SIZE_FOR_ESTIMATE SHARED_POOL_SIZE_FACTOR ESTD_LC_SIZE ESTD_LC_MEMORY_OBJECTS ESTD_LC_TIME_SAVED ESTD_LC_TIME_SAVED_FACTOR ESTD_LC_LOAD_TIME ESTD_LC_LOAD_TIME_FACTOR ESTD_LC_MEMORY_OBJECT_HITS
                              124                   .7561            6                    526             342198                      .991              3331                  16.0918                     705799
                              144                    .878           26                   2018             343203                     .9939              2326                  11.2367                    2162766
                              164                       1           46                   3297             345322                         1               207                        1                    2177631
                              184                   1.122           66                   4698             345433                    1.0003                96                    .4638                    2179067
                              204                  1.2439           86                   6164             345438                    1.0003                91                    .4396                    2179314
                              224                  1.3659          101                   7094             345440                    1.0003                89                      .43                    2179379
                              244                  1.4878          104                   7324             345440                    1.0003                89                      .43                    2179379
                              264                  1.6098          104                   7324             345440                    1.0003                89                      .43                    2179379
                              284                  1.7317          104                   7324             345440                    1.0003                89                      .43                    2179379
                              304                  1.8537          104                   7324             345440                    1.0003                89                      .43                    2179379
                              324                  1.9756          104                   7324             345440                    1.0003                89                      .43                    2179379
                              344                  2.0976          104                   7324             345440                    1.0003                89                      .43                    2179379
    12 rows selected.
    SQL>

  • How can I handle ora 04031 error ?

    Hi there,
    I got ora 04031 error message.
    so I increased shared memory size.
    After that I got again ora 04031.
    How can I fix this error? Pls give me a talk.
    Thanks.

    Hi,
    This error isn't just caused by a lack of memory, it can also be caused by fragmentation of the shared pool. It quite often shows up in applications where developers don't use bind variables and issue a large number of very similar but distinct queries, especially in long running processes. In this case you can try regularly flushing the shared pool or beating the developers about the head every time you see them not using bind variables.
    Andre

  • 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'

  • ORA-04031 error in 8i

    Hi Sir,
    I am installing oracle 8.1.5 on a windows 2003 server R2 SP2
    machine, its having 4GB of RAM.
    I have choosen to install the preconfigured starter DB, when DBCA is creating
    the DB is throws the following error message...
    ORA-04031 unable to allocate 102724472 bytes of shared memory
    ("shared pool","unknown object","sga heap","db_block_buffers")
    Then Ignore or abort comes.
    Please give me any solution.
    Edited by: Wason Naveen on Nov 7, 2009 4:15 AM

    Hello,
    In general ORA-4031 is an error due to a lack of memory (shared_pool).
    So you should check for the parameter SHARED_POOL_SIZE and increase it (for instance to 200 Mo).
    Else, about the release, I'm surprised that you use Oracle 8.1.5. It's an old release and I'm not sure it's
    certified on Windows 2003.
    Best regards,
    Jean-Valentin

  • 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?

  • ORA-12801: error signaled in parallel query server P000

    Hello All,
    Week before one of the APPLY process ABORTED with following error:
    ORA-12801: error signaled in parallel query server P000
    ORA-04031: unable to allocate 104 bytes of shared memory ("streams pool","unknown object","apply shared t","knalfGetTxn:lcr")
    We are using ORACLE 10.2.0.4.0 on HP unix B.11.23
    For now, I have started the APPLY process again and it's working properly.
    When I looked into the trace file it shows following
    A001: [enq: TM - contention] name|mode=544d0002, object #=2a67, table/partition=0
    *** 2009-06-15 10:53:57.897
    A001: warning -- apply server 1, sid 302 waiting on user sid 267 for event (since 302 seconds):
    A001: [enq: TM - contention] name|mode=544d0002, object #=2a67, table/partition=0
    *** 2009-06-15 10:58:58.792
    A001: warning -- apply server 1, sid 302 waiting on user sid 267 for event (since 603 seconds):
    A001: [enq: TM - contention] name|mode=544d0002, object #=2a67, table/partition=0
    *** 2009-06-15 12:14:36.679
    A001: [enq: TX - row lock contention] name|mode=54580004, usn<<16 | slot=90028, sequence=1b743
    *** 2009-06-15 12:19:36.961
    A001: warning -- apply server 1, sid 302 waiting on user sid 181 for event (since 300 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580004, usn<<16 | slot=90028, sequence=1b743
    *** 2009-06-15 12:24:37.417
    A001: warning -- apply server 1, sid 302 waiting on user sid 181 for event (since 600 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580004, usn<<16 | slot=90028, sequence=1b743
    *** 2009-06-15 12:29:37.906
    A001: warning -- apply server 1, sid 302 waiting on user sid 181 for event (since 901 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580004, usn<<16 | slot=90028, sequence=1b743
    *** 2009-06-15 12:34:37.428
    A001: warning -- apply server 1, sid 302 waiting on user sid 181 for event (since 1201 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580004, usn<<16 | slot=90028, sequence=1b743
    *** 2009-06-19 11:26:44.601
    A001: [enq: TX - row lock contention] name|mode=54580006, usn<<16 | slot=8001e, sequence=1a4af
    *** 2009-06-19 11:31:43.753
    A001: warning -- apply server 1, sid 302 waiting on user sid 212 for event (since 300 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580006, usn<<16 | slot=8001e, sequence=1a4af
    *** 2009-06-19 11:36:44.149
    A001: warning -- apply server 1, sid 302 waiting on user sid 212 for event (since 600 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580006, usn<<16 | slot=8001e, sequence=1a4af
    *** 2009-06-19 11:41:43.775
    A001: warning -- apply server 1, sid 302 waiting on user sid 212 for event (since 900 seconds):
    A001: [enq: TX - row lock contention] name|mode=54580006, usn<<16 | slot=8001e, sequence=1a4af
    *** 2009-06-23 16:55:24.002
    A001: [enq: TM - contention] name|mode=544d0004, object #=2c05, table/partition=0
    *** 2009-06-29 09:48:58.166
    A001: [enq: TM - contention] name|mode=544d0004, object #=2c05, table/partition=0
    *** 2009-07-01 06:02:37.236
    A001: [enq: TM - contention] name|mode=544d0004, object #=2c05, table/partition=0
    *** 2009-07-01 11:46:43.672
    error 12801 in STREAMS process
    ORA-12801: error signaled in parallel query server P000
    ORA-04031: unable to allocate 104 bytes of shared memory ("streams pool","unknown object","apply shared t","knalfGetTxn:lcr")
    OPIRIP: Uncaught error 447. Error stack:
    ORA-00447: fatal error in background process
    ORA-12801: error signaled in parallel query server P000
    ORA-04031: unable to allocate 104 bytes of shared memory ("streams pool","unknown object","apply shared t","knalfGetTxn:lcr")
    Can you please help to provide details on that how i can fix this problem permanetely.
    Any suggestions would be great!
    Thanks,
    Nick

    It seems that you are using Oracle database and not Berkeley Database.
    To fix ORA-04031 errors on streams pool, you need to increase streams pool size with
    alter system set streams_pool_size=<the right value>;See recommandations in http://download.oracle.com/docs/cd/B19306_01/server.102/b14229/strms_mprep.htm#i1006278

  • 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

  • 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

  • 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

  • Frequent ORA-04031

    Hi All,
    We are experiencing frequent ORA-04031 Error. Every time it seems like related to BAMIMA: Bam Buffer.
    Below is the error message we get every time....
    ORA-04031: unable to allocate 86840 bytes of shared memory ("shared pool","CSI_DATASTRUCTURES_PUB_W","PL/SQL MPCODE","BAMIMA: Bam Buffer") ORA-06508: PL/SQL: could not find program unit being called ORA-06512: at "APPS.CSI_JAVA_INTERFACE_PKG_W", line 544 ORA-06512: at line 1.
    Every time we get this error as a workaround we are flushing shared pool. We would like to have a permamnent fix for this error.
    Previous time we observed the error we captured status from shared pool using sqls mentioned in the note on how to trouble shoot the error. Below are the details.
    PMLDVI> SELECT KSMCHCLS CLASS, COUNT(KSMCHCLS) NUM, SUM(KSMCHSIZ) SIZ,
    2 To_char( ((SUM(KSMCHSIZ)/COUNT(KSMCHCLS)/1024)),'999,999.00')||'k' "AVG SIZE"
    3 FROM X$KSMSP GROUP BY KSMCHCLS;
    CLASS NUM SIZ AVG SIZE
    R-free 3143 31298556 9.72k
    R-freea 3321 22229092 6.54k
    R-perm 3791 43872580 11.30k
    R-recr 3 564 .18k
    free 52920 165384092 3.05k
    freeabl 455464 491624024 1.05k
    perm 8305 126528064 14.88k
    recr 164651 92139468 .55k
    PMLDVI> select component, current_size, min_size, max_size, granule_size from v$sga_dynamic_components
    / 2 3
    COMPONENT CURRENT_SIZE MIN_SIZE MAX_SIZE GRANULE_SIZE
    shared pool 905969664 905969664 905969664 16777216
    large pool 201326592 201326592 201326592 16777216
    buffer cache 486539264 486539264 486539264 16777216
    PMLDVI> select KSMCHIDX "SubPool", 'sga heap('||KSMCHIDX||',0)'sga_heap,ksmchcom ChunkComment,
    2 decode(round(ksmchsiz/1000),0,'0-1K', 1,'1-2K', 2,'2-3K',3,'3-4K',
    3 4,'4-5K',5,'5-6k',6,'6-7k',7,'7-8k',8,
    4 '8-9k', 9,'9-10k','> 10K') "size",
    5 count(*),ksmchcls Status, sum(ksmchsiz) Bytes
    6 from x$ksmsp
    7 where KSMCHCOM = 'free memory'
    8 group by ksmchidx, ksmchcls,
    9 'sga heap('||KSMCHIDX||',0)',ksmchcom, ksmchcls,decode(round(ksmchsiz/1000),0,'0-1K',
    10 1,'1-2K', 2,'2-3K', 3,'3-4K',4,'4-5K',5,'5-6k',6,
    11 '6-7k',7,'7-8k',8,'8-9k', 9,'9-10k','> 10K');
    SubPool SGA_HEAP CHUNKCOMMENT size COUNT(*) STATUS BYTES
    1 sga heap(1,0) free memory 0-1K 14803 free 1659324
    1 sga heap(1,0) free memory 1-2K 3866 free 3029472
    1 sga heap(1,0) free memory 2-3K 1546 free 2800644
    1 sga heap(1,0) free memory 3-4K 9592 free 29320940
    1 sga heap(1,0) free memory 4-5K 6981 free 26635544
    1 sga heap(1,0) free memory 5-6k 68 free 329244
    1 sga heap(1,0) free memory 6-7k 9 free 52448
    1 sga heap(1,0) free memory 7-8k 24 free 169648
    1 sga heap(1,0) free memory 8-9k 30 free 239672
    1 sga heap(1,0) free memory 9-10k 3 free 25852
    1 sga heap(1,0) free memory > 10K 2 free 21636
    1 sga heap(1,0) free memory 0-1K 110 R-free 23632
    1 sga heap(1,0) free memory 1-2K 118 R-free 117192
    1 sga heap(1,0) free memory 2-3K 93 R-free 183976
    1 sga heap(1,0) free memory 3-4K 97 R-free 301824
    1 sga heap(1,0) free memory 4-5K 285 R-free 1131096
    1 sga heap(1,0) free memory 5-6k 44 R-free 217448
    1 sga heap(1,0) free memory 6-7k 34 R-free 204612
    1 sga heap(1,0) free memory 7-8k 40 R-free 281616
    1 sga heap(1,0) free memory 8-9k 149 R-free 1210056
    1 sga heap(1,0) free memory 9-10k 42 R-free 372648
    1 sga heap(1,0) free memory > 10K 529 R-free 7758560
    2 sga heap(2,0) free memory 0-1K 12287 free 598420
    2 sga heap(2,0) free memory 2-3K 4 free 7856
    2 sga heap(2,0) free memory 3-4K 2 free 6276
    2 sga heap(2,0) free memory 4-5K 5 free 19316
    2 sga heap(2,0) free memory 6-7k 1 free 5576
    2 sga heap(2,0) free memory 9-10k 1 free 9264
    2 sga heap(2,0) free memory > 10K 4080 free 96903548
    2 sga heap(2,0) free memory 0-1K 57 R-free 7852
    2 sga heap(2,0) free memory 1-2K 42 R-free 41756
    2 sga heap(2,0) free memory 2-3K 52 R-free 105100
    2 sga heap(2,0) free memory 3-4K 59 R-free 184188
    2 sga heap(2,0) free memory 4-5K 134 R-free 537868
    2 sga heap(2,0) free memory 5-6k 58 R-free 286236
    2 sga heap(2,0) free memory 6-7k 53 R-free 322096
    2 sga heap(2,0) free memory 7-8k 73 R-free 511620
    2 sga heap(2,0) free memory 8-9k 127 R-free 1016488
    2 sga heap(2,0) free memory 9-10k 52 R-free 465852
    2 sga heap(2,0) free memory > 10K 894 R-free 15876048
    Also the init variable values the db using is as below...
    shared_pool_size = 850M
    db_cache_size      = 450M
    shared_pool_reserved_size = 100000000
    sharedpool_reserved_min_alloc = 4100
    olap_page_pool_size = 4194304
    All these variables seem like having proper values....but still the issues are occuring almost this error is getting reported for every twodays.
    If any body has experienced this situation, please let me know how you could get around with this.
    If already these variables are at proper values.. please let me know whether there is any way i can detect the condiction before and prior the error is raised so that i can automatically detect and flush shared pool, so that i can atleast prevent the error from occuring.
    Thanks & Regards.

    Hi All,
    OS is SunOS 32bit. DB version is 9.2.0.6. Its not using shared server configuration. This database is being used by 11.5.9 Apps.
    Thanks,
    Adi.

  • 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

  • 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

  • Resolving errors ORA-01652 and ORA-04031

    Hi,
    My database is 8.1.7
    i am frequenty getting this error.
    suggestion required.

    For ORA-01652, check free space in your datafiles.
    For ORA-04031, upgrade to Oracle 8.1.7.4.1 or higher.

Maybe you are looking for

  • Unable to deploy a bean

    I create the jar file as follows: java -cp D:\bea\wlserver6.1lib\weblogic.jar weblogic.ejbc -compiler javac D:\working\icechill\classes\ScipBeans.jar D:\bea\wlserver6.1\config\mydomain\applications\ScipBeans.jar After that I start my weblogic6.1 serv

  • Usb device not recognized...cannot restore or access drive on two computers

    I cannot restore my ipod on two different computers and I am receiving the "cannot recognize" error message on both. Do I have a hardware damage issue? Replacing or updating the usbstor does nothing to alleviate the problem and when I attempt to rest

  • ITunes 7.5 won't recognize any ipods

    Since iTunes updated to 7.5, it will not recognize any of my iPods. Not the classic, not the nano. Connecting with USB, and I don't have a firewire cable to try. Error message is +"An iPod has been detected, but it could not be identified properly. P

  • How to archive the table entries

    HI all Which transaction code is used to findout the spefic table size in tablespace, we are not able to findout the specific table size in transaction code DB02. Please help us. 1. How to archive the sap tablespace if you have any document to follow

  • New psu for my kt4v

    i'm going to be getting a thermaltake purepower 420W in the next couple of days and i'm just double checking to see whether anyone has had any experiences and/or problems with this and their kt4s or k7ns (delta will be my next mobo).  i've read many