Gathering Initial Troubleshooting Information for Analysis of ORA-4031 Errors on the Shared Pool
2014-12-09 19:05
696 查看
In this Document
Oracle Database - Enterprise Edition - Version 8.0.6.3 and later
Information in this document applies to any platform.
The purpose of this document is to provide some steps to take to gather some essential information necessary for initial analysis of ORA-4031 errors on the shared pool. For more detailed information gathering, please
refer to MOS Document 430473.1.
Note: this document only applies to ORA-4031 errors generated on the shared pool. For ORA-4031 errors on the large pool, please review MOS Document 1674933.1.
For ORA-4031 errors on the Java and Streams pools, please review MOS Document 1675450.1.
Review MOS Document 1674117.1 on
what information is to be gathered for analysis of an ORA-4031 issue, why this information is necessary, and how to obtain it.
At least the following pieces of information should be collected to be able to start analysis of the ORA-4031 issue:
For Oracle10g and lower releases, obtain the trace file of the very first ORA-4031 occurrence reported after the last instance startup. For Oracle11g and higher release, obtain the incident package (see MOS Document 443529.1)
of the very first ORA-4031 incident reported after the last instance startup.
Obtain the RDA report (see MOS Document 314422.1 for
details of installing & running RDA. RDA can be included in incident packages by default in 11.2.0.2 onwards by following the instructions in MOS Document 1456047.1).
Obtain the current memory allocations in the shared pool:
CONNECT / AS SYSDBA
SET PAGESIZE 9999
SET LINESIZE 256
SET TRIMOUT ON
SET TRIMSPOOL ON
COL 'Total Shared Pool Usage' FORMAT 99999999999999999999999
COL bytes FORMAT 999999999999999
COL current_size FORMAT 999999999999999
COL name FORMAT A40
COL value FORMAT A20
ALTER SESSION SET nls_date_format='DD-MON-YYYY HH24:MI:SS';
SPOOL SGAPARAMS.TXT
/* Database identification */
SELECT name, platform_id, database_role FROM v$database;
SELECT * FROM v$version WHERE banner LIKE 'Oracle Database%';
/* Current instance parameter values */
SELECT n.ksppinm name, v.KSPPSTVL value
FROM x$ksppi n, x$ksppsv v
WHERE n.indx = v.indx
AND (n.ksppinm LIKE '%shared_pool%' OR n.ksppinm IN ('_kghdsidx_count', '_ksmg_granule_size', '_memory_imm_mode_without_autosga'))
ORDER BY 1;
/* Current memory settings */
SELECT component, current_size FROM v$sga_dynamic_components;
/* Memory resizing operations */
SELECT start_time, end_time, component, oper_type, oper_mode, initial_size, target_size, final_size, status
FROM v$sga_resize_ops
ORDER BY 1, 2;
/* Historical memory resizing operations */
SELECT start_time, end_time, component, oper_type, oper_mode, initial_size, target_size, final_size, status
FROM dba_hist_memory_resize_ops
ORDER BY 1, 2;
/* Shared pool 4031 information */
SELECT request_failures, last_failure_size FROM v$shared_pool_reserved;
/* Shared pool reserved 4031 information */
SELECT requests, request_misses, free_space, avg_free_size, free_count, max_free_size FROM v$shared_pool_reserved;
/* Shared pool memory allocations by size */
SELECT name, bytes FROM v$sgastat WHERE pool = 'shared pool' AND (bytes > 999999 OR name = 'free memory') ORDER BY bytes DESC;
/* Total shared pool usage */
SELECT SUM(bytes) "Total Shared Pool Usage" FROM v$sgastat WHERE pool = 'shared pool' AND name != 'free memory';
/* Cursor sharability problems */
/* This version is for >= 10g; for <= 9i substitute ss.kglhdpar for ss.address!!!! */
SELECT sa.sql_text,sa.version_count,ss.*
FROM v$sqlarea sa,v$sql_shared_cursor ss
WHERE sa.address=ss.address AND sa.version_count > 50
ORDER BY sa.version_count ;
SPOOL OFF
For Oracle10g ang later, obtain an AWR report (see MOS Document 748642.1)
from the period where the first ORA-4031 was encountered:
CONNECT / AS SYSDBA
@?/rdbms/admin/awrrpt.sql
For Oracle10g and later, obtain SGA statistics:
CONNECT / AS SYSDBA
ORADEBUG setmypid
ORADEBUG unlimit
ALTER SESSION SET events 'immediate trace name dump_all_comp_granule_addrs level 1';
ORADEBUG tracefile_name
ORADEBUG close_trace
After having gathered all of the above information, upload the information to the Service Request.
NOTE:443529.1 - Database 11g: Quick
Steps to Package and Send Critical Error Diagnostic Information to Support [Video]
NOTE:314422.1 - Remote Diagnostic
Agent (RDA) - Getting Started
NOTE:430473.1 - ORA-4031 Common Analysis/Diagnostic
Scripts [Video]
NOTE:1456047.1 - How to Setup Automatic
RDA Data Collection for Incident Packages?
NOTE:1675450.1 - Gathering Initial
Troubleshooting Information for Analysis of ORA-4031 Errors on Java and Streams Pools
NOTE:1674117.1 - SRDC - ORA-4031
on Shared Pool: Checklist of Evidence to Supply
NOTE:1674933.1 - Gathering Initial
Troubleshooting Information for Analysis of ORA-4031 Errors on the Large Pool
others
ORA-04031: Unable to Allocate %n Bytes of Shared Memory ("shared pool",%s,%s,%s)
Oracle Database - Enterprise Edition - Version 8.1.7.4 and later
Information in this document applies to any platform.
***Checked for relevance on 31-Jul-2013***
Archived
ORA-04031: unable to allocate %s bytes of shared memory (\"%s\",\"%s\",\"%s\",\"%s\")
Purpose |
Troubleshooting Steps |
References |
APPLIES TO:
Oracle Database - Enterprise Edition - Version 8.0.6.3 and laterInformation in this document applies to any platform.
PURPOSE
The purpose of this document is to provide some steps to take to gather some essential information necessary for initial analysis of ORA-4031 errors on the shared pool. For more detailed information gathering, pleaserefer to MOS Document 430473.1.
Note: this document only applies to ORA-4031 errors generated on the shared pool. For ORA-4031 errors on the large pool, please review MOS Document 1674933.1.
For ORA-4031 errors on the Java and Streams pools, please review MOS Document 1675450.1.
TROUBLESHOOTING STEPS
Review MOS Document 1674117.1 onwhat information is to be gathered for analysis of an ORA-4031 issue, why this information is necessary, and how to obtain it.
At least the following pieces of information should be collected to be able to start analysis of the ORA-4031 issue:
For Oracle10g and lower releases, obtain the trace file of the very first ORA-4031 occurrence reported after the last instance startup. For Oracle11g and higher release, obtain the incident package (see MOS Document 443529.1)
of the very first ORA-4031 incident reported after the last instance startup.
Obtain the RDA report (see MOS Document 314422.1 for
details of installing & running RDA. RDA can be included in incident packages by default in 11.2.0.2 onwards by following the instructions in MOS Document 1456047.1).
Obtain the current memory allocations in the shared pool:
CONNECT / AS SYSDBA
SET PAGESIZE 9999
SET LINESIZE 256
SET TRIMOUT ON
SET TRIMSPOOL ON
COL 'Total Shared Pool Usage' FORMAT 99999999999999999999999
COL bytes FORMAT 999999999999999
COL current_size FORMAT 999999999999999
COL name FORMAT A40
COL value FORMAT A20
ALTER SESSION SET nls_date_format='DD-MON-YYYY HH24:MI:SS';
SPOOL SGAPARAMS.TXT
/* Database identification */
SELECT name, platform_id, database_role FROM v$database;
SELECT * FROM v$version WHERE banner LIKE 'Oracle Database%';
/* Current instance parameter values */
SELECT n.ksppinm name, v.KSPPSTVL value
FROM x$ksppi n, x$ksppsv v
WHERE n.indx = v.indx
AND (n.ksppinm LIKE '%shared_pool%' OR n.ksppinm IN ('_kghdsidx_count', '_ksmg_granule_size', '_memory_imm_mode_without_autosga'))
ORDER BY 1;
/* Current memory settings */
SELECT component, current_size FROM v$sga_dynamic_components;
/* Memory resizing operations */
SELECT start_time, end_time, component, oper_type, oper_mode, initial_size, target_size, final_size, status
FROM v$sga_resize_ops
ORDER BY 1, 2;
/* Historical memory resizing operations */
SELECT start_time, end_time, component, oper_type, oper_mode, initial_size, target_size, final_size, status
FROM dba_hist_memory_resize_ops
ORDER BY 1, 2;
/* Shared pool 4031 information */
SELECT request_failures, last_failure_size FROM v$shared_pool_reserved;
/* Shared pool reserved 4031 information */
SELECT requests, request_misses, free_space, avg_free_size, free_count, max_free_size FROM v$shared_pool_reserved;
/* Shared pool memory allocations by size */
SELECT name, bytes FROM v$sgastat WHERE pool = 'shared pool' AND (bytes > 999999 OR name = 'free memory') ORDER BY bytes DESC;
/* Total shared pool usage */
SELECT SUM(bytes) "Total Shared Pool Usage" FROM v$sgastat WHERE pool = 'shared pool' AND name != 'free memory';
/* Cursor sharability problems */
/* This version is for >= 10g; for <= 9i substitute ss.kglhdpar for ss.address!!!! */
SELECT sa.sql_text,sa.version_count,ss.*
FROM v$sqlarea sa,v$sql_shared_cursor ss
WHERE sa.address=ss.address AND sa.version_count > 50
ORDER BY sa.version_count ;
SPOOL OFF
For Oracle10g ang later, obtain an AWR report (see MOS Document 748642.1)
from the period where the first ORA-4031 was encountered:
CONNECT / AS SYSDBA
@?/rdbms/admin/awrrpt.sql
For Oracle10g and later, obtain SGA statistics:
CONNECT / AS SYSDBA
ORADEBUG setmypid
ORADEBUG unlimit
ALTER SESSION SET events 'immediate trace name dump_all_comp_granule_addrs level 1';
ORADEBUG tracefile_name
ORADEBUG close_trace
After having gathered all of the above information, upload the information to the Service Request.
REFERENCES
NOTE:443529.1 - Database 11g: QuickSteps to Package and Send Critical Error Diagnostic Information to Support [Video]
NOTE:314422.1 - Remote Diagnostic
Agent (RDA) - Getting Started
NOTE:430473.1 - ORA-4031 Common Analysis/Diagnostic
Scripts [Video]
NOTE:1456047.1 - How to Setup Automatic
RDA Data Collection for Incident Packages?
NOTE:1675450.1 - Gathering Initial
Troubleshooting Information for Analysis of ORA-4031 Errors on Java and Streams Pools
NOTE:1674117.1 - SRDC - ORA-4031
on Shared Pool: Checklist of Evidence to Supply
NOTE:1674933.1 - Gathering Initial
Troubleshooting Information for Analysis of ORA-4031 Errors on the Large Pool
others
ORA-04031: Unable to Allocate %n Bytes of Shared Memory ("shared pool",%s,%s,%s)
APPLIES TO:
Oracle Database - Enterprise Edition - Version 8.1.7.4 and laterInformation in this document applies to any platform.
***Checked for relevance on 31-Jul-2013***
Archived
PURPOSE
ORA-04031: unable to allocate %s bytes of shared memory (\"%s\",\"%s\",\"%s\",\"%s\")
TROUBLESHOOTING STEPS
fix: Try to increase shared_pool_size in init.ora file. If it seems large enough then improve segmentation in shared pool by reserving part of shared pool for large objects using parameter SHARED_POOL_RESERVED_SIZE (good value to start tuning is 1/3 of shared-pool size). It is possible to decide what is " large object" by parameter SHARED_POOL_RESERVED_MIN_ALLOC.
相关文章推荐
- Gathering Initial Troubleshooting Information for Analysis of ORA-4031 Errors on the Shared Pool
- Gathering Initial Troubleshooting Information for Analysis of ORA-4031 Errors on the Shared Pool
- Unable to start debugging on the web server. The web server is not configured correctly. See help for common configuration errors. Running the web page outside of the debugger may provide further information.
- Diagnosing and Resolving Error ORA-04031 on the Shared Pool or Other Memory Pools (文档 ID 146599.1)
- Collecting The Required Information For Support To Validate & Troubleshooting ASM Diskgroup Corrupti
- Referenced file contains errors (http://www.springframework.org/schema/context). For more information, right click on the message in the Problems
- XML错误信息Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-4.0.xsd). For more information, right click on the message in the Problems View ...
- TACAS(International Conference on Tools and Algorithms for the Construction and Analysis of Systems)到底是什么档次的会议?
- Referenced file contains errors (http://www.springframework.org/schema/aop/spring-aop-3.0.xsd). For more information, right click on the message in th
- How To Gather Information for Effective Troubleshooting of Performance Issues [ZT-from MS]
- TACAS(International Conference on Tools and Algorithms for the Construction and Analysis of Systems)到底是什么档次的会议?
- ICTIR 2016 Analysis of the Paragraph Vector Model for Information Retrieval
- [INS-41107]eth0 selected for one or more of the public or private interfaces is not on a shared subn
- Analysis on the Concept of “Cloud Computing”:A Case of the Collaborative Intelligence System
- Memory Information on the bottom of Android "Running Services"
- A list of books on general-purpose algorithms for the practical programmer (or 'software engineer')
- Troubleshooting ORA-1652 Errors in RAC
- The name or security ID (SID) of the domain specified is inconsistent with the trust information for that domain
- ora-4031 and "obj stat memory" component in Shared Pool
- Install Hotfix for WSS(KB974989 x86) ERROR:The expected version of the product was not found on the system