Frequent ORA-04031 in the 10g seed db

The db is lightly used and includes sample schemes. The complaint is always about allocations from the "large pool" whose size was set at 8mb. The problem could appear in tools like rapid sql when it enumerated from the dictionary, say, or in the java OEM doing similar tasks. Some queries that aggregated would note their recursive nature. then complain about memory. I've done two things to overcome thing (I'm new to Oracle, by the way): first, I set sga_target to 300m to supposedly allow oracle to manage more of this work itself. That didn't seem to help; I believe that was about the initial size of the sga anyway. Second, I raised the total size then set the large pool to 20m. I have not seen 04031 since I made that change, but I know that doesn't necessarily mean it was the right move. Below are results from v$parameter:
NAME VALUE
sga_max_size 331350016
__shared_pool_size 167772160
shared_pool_size 167772160
__large_pool_size 20971520
large_pool_size 20971520
__java_pool_size 104857600
java_pool_size 104857600
streams_pool_size 0
shared_pool_reserved_size 8388608
sga_target 331350016
__db_cache_size 33554432
db_cache_size 25165824
db_2k_cache_size 0
db_4k_cache_size 0
db_8k_cache_size 0
db_16k_cache_size 0
db_32k_cache_size 0
db_keep_cache_size 0
db_recycle_cache_size 0
db_recovery_file_dest_size 2147483648
pga_aggregate_target 25165824
olap_page_pool_size 0
Your advice or commentary would be welcome. Thanks!

Greetings Raj. Mostly 04031 came from GUI tools like Rapid SQL or Oracle's own Enterprise Manager (the one written in Java, distributed with the client). Asking Rapid SQL to show a list of db objects could make the error, which would read like "unable to allocate 8192 bytes from large pool." So I can't say how the SQL is done in those cases. I have not done very much straight sql with this yet, but a case likely to bring the "recursive sql" complaint followed by the memory complaint would be any sql with DISTINCT in the select clause.
I suppose a fundamental question would be how large should the sga "large pool" be for the seed database that's unused except for management of the Oracle instance. I'll stody the bind variables, but mostly I should have been able to do what I was doing without that, particularly since in most cases I experienced, I wasn't in control of the sql--Oracle was. ;-)

Similar Messages

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

  • ORA-04031 on 10g - should I just adjust my SGA POOL SIZE?

    Has anyone gotten this message frequently:
    ORA-04031: unable to allocate 37536 bytes of shared memory ("shared pool","unknown object","sga heap(1,0)","session parame")
    We are a business intelligence application that issues lots of large queries. We just migrated to 10g and we are seeing this every 2-3 days on our testing machine.
    In particular, I am not sure about "sga heap"... I would just set my Shared Pool Size higher - currently 144 MB but will this help here? Thoughts?

    In Oracle 10g a new feature called "automatic memory management" allows the dba to reserve a pool of shared memory that is used to allocate the shared pool, the buffer cache, the java pool and the large pool.
    In general, when the database needs to allocate a large object into the shared pool and cannot find contiguous space available, it will automatically increase the shared pool size using free space from other SGA structure.
    Since the space allocation is automatically managed by Oracle, the probability of getting ora-4031 errors may be greatly reduced. Automatic Memory Management is enabled when the parameter SGA_TARGET is greater than zero and the current setting can be obtained quering the v$sga_dynamic_components view.
    Please refer to the 10g Administration Manual for further reference
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14231/toc.htm

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

  • 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

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

  • 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

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

  • ORACLE error ORA-04031: unable to allocate 16 bytes of memory

    Error
    UDI-04031: operation generated ORACLE error 4031
    ORA-04031: unable to allocate 16 bytes of shared memory ("shared pool","SELECT j
    generated during import operation, using documentation about migration from 10g XE to 11g XE.

    Hello,
    you could try to override the automatic memory management and setup your SGA to be larger by setting SGA_TARGET. If that doesn't help yet, you could even try to configure the memory size for the components in SGA manually, but I guess this won't be necessary.
    After your import is done, I'd recommend to use automatic memory management again.
    See the XE 2 Day DBA for details, especially the section on [url http://download.oracle.com/docs/cd/E17781_01/server.112/e18804/memory.htm#ADMQS174]Managing Memory. It's not a complete guide, but a rough introduction, but it'll probably help you understand the memory concepts in the database.
    Keep in mind that you may only assign 1 GB of memory in total when you setup your memory manually.
    -Udo

  • 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

  • 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

  • Unable to connect to the 10g Express edition database in oracle forms

    hi,
    i have installed Oracle Database 10g Express Edition and oracle 10g developer suite. i need to work on oracle forms by connecting to the database of the 10g express edition but unable to do so as i am not aware of the database name or SID.
    can any one tell me how to connect to the above database in oracle forms by specifying username, password and database name ?
    Thanks,
    Viddu

    specifying username, passwordSet up your database user, easy way is to grant them the resource role (*strongly* suggest not using sys nor system for user data) here's one command line sqlplus method:
    $ sqlplus /nolog
    SQL> connect system -- or connect /as sysdba; if system credential is lost/forgotten
    SQL> create user username identified by userpasswd default tablespace <tablespace> temporary tablespace <temp tablespace>;
    SQL> grant connect, resource to username;
    SQL> exit;
    > the database name or SID
    Its XE "out of the box", with a servicename is XE as well, using the default port 1521 on the host. The install should also set up a tns alias named, oddly enough, XE, with those connection details from the install. It comes with a USERS data tablespace, and TEMP temporary tablespace.
    So after the user is created, i.e. with sqlplus:
    SQL> connect username/passwd
    or if your session is not on the host where the database is running, with a tns alias pointing to the XE install host in place:
    SQL> connect username/passwd@xe
    From a different client machine you will need a tnsnames.ora entry defining an alias, it could be any name you would prefer to use as long as the entry points the the database host and port with the correct ORACLE_SID or the database service name.
    And don't forget to glance over the documentation, it is thorough and helpful as well http://www.oracle.com/pls/xe102/homepage

Maybe you are looking for