ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-04030

ORA-04030

原创 Linux操作系统 作者:frog-qs 时间:2010-12-22 17:14:31 0 删除 编辑

错误如下:

GATHER_STATS_JOB encountered errors.  Check the trace file.
Sat Nov 27 06:00:15 2010
Errors in file /oradata/oracle/admin/app2/bdump/app2_j001_978984.trc:
ORA-04030: out of process memory when trying to allocate 8192 bytes (sort subheap,sort key)

查了一下metalink,相关解释如下:
    This error indicates that the oracle server process is unable to allocate more memory from the operating system.
    这个错误暗示了ORACLE服务器进程从OS中,不能分配更多的内存。
    The ORA-4030 thus indicates the process needs more memory (stack UGA or PGA) to perform. its job.
    ORA-4030暗示了进程需要更多的内存(UGA和PGA)去执行他的工作。
    1. Is there still sufficient memory available
       查看OS是否还有充足的可用内存
       top :usually displays physical memory and swapspace statistics.
       swapon -s :displays swapspace usage
       vmstat : displays free physical memory

    2. Is there an operating system limit set?
       查看OS上时候做了相关内存使用资源的限制
       ulimit -a

    3. Is there an oracle limit set?
       查看ORACLE 有无限制
       PGA parameter implemented which limits the total amount of PGA that can be allocated for an instance
            select sum(value)/1024/1024 Mb
             from  v$sesstat s, v$statname n
             where n.STATISTIC# = s.STATISTIC#
             and name = 'session pga memory';

   4. Which process is requesting too much memory
      SQL> select sid,name,value
            from v$statname n,v$sesstat s
            where n.STATISTIC# = s.STATISTIC# and name like 'session%memory%' order by 3 asc;

    5. How to collect information on what the process is actually doing
       a.select sql_text 
            from v$sqlarea a, v$session s
            where a.address = s.sql_address
            and s.sid =

       b. alter session set events '4030 trace name heapdump level 25'
          This dump can be used by Oracle Support analysts to find the cause of the excessive memory allocation.

    6. General suggestions on avoiding this error
       a. some operations just require a lot of memory. For sort issues, decreasing SORT_AREA_SIZE can help.This means that lowering SORT_AREA_SIZE can have a performance impact on queries requiring huge sort operations.
       b. WORKAREA_SIZE_POLICY = AUTO  &  PGA_AGGREGATE_TARGET >0
       c. Make sure your operating system and oracle limits are set reasonably
       d. Make sure there is enough memory available (physical memory and swapspace)

     Starting with Oracle9i, an option is provided to completely automate the management of PGA memory.  Administrators merely need to specify the maximum amount of PGA memory available to an instance using a newly introduced initialization parameter PGA_AGGREGATE_TARGET.
    Furthermore, Oracle9i and newer releases can adapt itself to changing workload thus utilizing resources efficiently regardless of the load on the system. The
    alter system set WORKAREA_SIZE_POLICY = AUTO
    and
    alter system set PGA_AGGREGATE_TARGET = (>0 int)
   
    In 9iR2, PGA_AGGREGATE_TARGET parameter controls the sizing of workareas for all dedicated server connections, but it has no effect on shared servers (aka MTS) connections and the *_AREA_SIZE parameters will take precedence in this case.
    In 10g, PGA_AGGREGATE_TARGET controls workareas allocated by both dedicated and shared connections.
    In 11g, Automatic Memory Management (AMM) expands to managing both SGA and PGA memory.   Under memory pressure for PGA memory, SGA memory will be re-allocated for use by a process to accommodate workarea needs.
    NOTE:   With AMM, setting an explicit value for PGA_AGGREGATE_TARGET will act as a minimum setting that AMM will not shrink below.
   

参考文献:1 .Subject: Diagnosing and Resolving ORA-4030 errors
                         Doc ID: 233869.1 Type: TROUBLESHOOTING
                         Modified Date : 05-FEB-2009 Status: PUBLISHED

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22779291/viewspace-682416/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 新年快乐
请登录后发表评论 登录
全部评论

注册时间:2009-10-27

  • 博文量
    132
  • 访问量
    273843