Wednesday, November 09, 2011

New ORA-4031 Troubleshooting Tool

Yesterday (Nov.09, 2011) Oracle delivered a web seminar to talk about the new tool. The tool has similar purpose of "ORA-600/ORA-7445 Error Look-up Tool" and can provide DBA an easy way to diagnose the ORA-4031 errors.

By uploading your problematic database's alert log file and trace files, the tool can automatically provide the issue identification and suggested solution based on its established guidelines.  Actually, you can get to read those guidelines without really uploading anything. So, you can even use the guideline to troubleshoot the database by yourself.

Here is the example information taken from the guideline:


Fault: Insufficient SGA Free Memory at Startup

Your instance SGA configuration has been flagged as having too little memory available for the automatic memory manager to make adjustments in the SGA component sizes.
This issue could occur if in the init.ora parameters of your Alert log, (shared_pool_size + large_pool_size + java_pool_size + db_keep_cache_size + streams_pool_size + db_cache_size) / sga_target is greater than 90%.
With the introduction of automatic memory management (ASMM in 10g, AMM in 11g), i.e. when SGA_TARGET > 0 or MEMORY_TARGET > 0, memory granules can be moved from one SGA component to another, depending on which component has an immediate need to grow.
The memory components are: shared pool, buffer cache, streams pool, large pool, java pool, log buffer.
The most common sharing of memory granules occur between the shared pool and the buffer cache and so these components can increase and decrease in size.
In order to limit how much any component will decrease in size, we set a minimum value by specifying a size in the parameter file.
For example, when SGA_TARGET >0 or MEMORY_TARGET > 0, then SHARED_POOL_SIZE=nnnn and B_CACHE_SIZE=nnnn become minimum sizes of these components.
The sum of all the minimum sizes determine the minimum size of the SGA at start up.
If the SGA_TARGET (or MEMORY_TARGET) is only slightly larger than the sum of the minimum settings, there will be very little memory to do any resizing, and this can lead to a ORA-4031.

Relevant Observation(s):



Resolution Action Plan

1) Reduce the minimum values for the dynamic SGA components to allow memory manager to make changes as needed
For example, either set:
shared_pool_size=new value
in the database INIT.ORA file,
or connect as SYSDBA and issue statements:
alter system set shared_pool_size=new value scope=both;
NOTE: Explicit settings (as minimums) can be changed while the database is online.
and
2) Modify auto-tuned configuration
10g: Increase value of SGA_TARGET to provide more SGA memory
Either set:
sga_target=new value
in the database INIT.ORA file,
or connect as SYSDBA and issue statements:
alter system set sga_target=new value scope=both;
Note: It will be necessary to restart the instance. That will mean that associated database will have to schedule an outage as well.
11g: Increase value of MEMORY_TARGET if used. If SGA_MAX_SIZE has been set remove the explicit setting and allow MEMORY_TARGET to manage the SGA sizing.
Either set:
memory_target=new value
(remove explicit setting if applicable) sga_max_size=value
in the database INIT.ORA file,
or connect as SYSDBA and issue statements:
alter system set memory_target=new value scope=both; (if explicitly setting SGA_MAX_SIZE) alter system reset sga_max_size scope=spfile;
Note: It will be necessary to restart the instance. That will mean that associated database will have to schedule an outage as well.
or
3) both of the above.
4) See these notes for further information regarding automatic memory configuration.
NOTE:781630.1 - How to configure ASMM (Auto Memory) on 10g and 11g - Best Practices
NOTE:452512.1- 11g MEMORY_TARGET Parameter Dependency
NOTE:443746.1- Automatic Memory Management(AMM) on 11g
NOTE:295626.1- How To Use Automatic Shared Memory Management (ASMM) In Oracle10g

Also, in the seminar, the presenter mentioned Oracle is also building the ORA-4300 troubleshooting tool. By promoting these tools, Oracle is not only helping DBA to do the work by themselves, but also saving money from support. In the end, Oracle can make more profit and get more customers.

Saturday, November 05, 2011

Oracle Internal Research深入研究Oracle内部原理

以下是刘相兵(Maclean Liu)个人原创或总结的一些深入研究Oracle Internal内部原理的文章post列表:

Oracle Internal Event:10200 Consistent Read诊断事件

了解Oracle RAC Brain Split Resolution

了解Oracle内核代码层的作用

了解你所不知道的SMON功能(九):维护MON_MODS$字典基表

了解你所不知道的SMON功能(八):Transaction Recover

了解你所不知道的SMON功能(七):清理IND$字典基表

了解你所不知道的SMON功能(六):Instance Recovery

了解你所不知道的SMON功能(五):Recover Dead transaction

了解你所不知道的SMON功能(四):维护col_usage$字典基表

了解你所不知道的SMON功能(三):清理obj$基表

了解你所不知道的SMON功能(二):合并空闲区间

了解你所不知道的SMON功能(一):清理临时段

Know more about commit

Find INTCOL#=1001 in col_usage$?

Buffer Lock Mode and Compatibilities

关于V$OPEN_CURSOR

Advanced Diagnostic using oradebug dumpvar

还原真实的cache recovery

Oracle内部视图:x$targetrba

Oracle内部视图:x$ktfbfe

Oracle内部视图:x$ktfbue

Only ARCH Bgprocess may create archivelog?

Oracle Latch:一段描绘Latch运作的伪代码

Who pulls the background process dbwr’s trigger?

基于行跟踪的ROWDEPENDENCIES ORA_ROWSCN信息

Oracle闩:Cache Buffers chains

Latches and Tuning:Latches

Latches and Tuning:Redo Log Buffer and Latches

Latches and Tuning:Buffer Cache

Latches and Tuning:The Library Cache

Oracle Database Links Master Class

Oracle等待事件:Data file init write

What’s the Point of Oracle Checkpoints?

How does RECORDLENGTH affect your exp speed?

Oracle网络TNS协议介绍(revised)

logfile switch causes incremental checkpoint?

Know more about redo log buffer and latches

How does cpu_count parameter affect instance?

How to trigger ORA-00600,ORA-7445 by manual

Basics of C code within the Oracle kernel

Know more about Oracle Latches

Know more about Buffer Cache and Latch

Know More About Libarary Cache and Latches

Oracle内部视图:X$BH

Know more about DML

Known Oracle Internal Stack Call Meaning

深入了解ASMM

_shared_pool_reserved_pct or shared_pool_reserved_size with ASMM

PL/SQL Virtual Machine Memory Usage

Slide:深入了解Oracle自动内存管理ASMM by Maclean Liu

Know GCS AND GES structure size in shared pool

How does SGA/PGA allocate on AMM?

理解Oracle在AIX平台上的内存使用

Probe how does your PGA consume

ora-4031 and “obj stat memory” component in Shared Pool

直接路径读取对于延迟块清除的影响

How to make BBED(Oracle Block Brower and EDitor Tool) on Unix/Linux/Windows

隐藏参数_high_priority_processes与oradism

Oracle等待事件Enqueue CI:Cross Instance Call Invocation

Oracle常用的几个父栓

ddl操作是否会产生undo?

kgl simulator,共享池simulator以及缓冲simulator相关解释

Saturday, October 29, 2011

OOW 2011

If you didn't attend this year's OOW, you still can download the presentation for free. Click here.

Tuesday, September 13, 2011

Demo about Oracle Parsing

This is a good demo from Andrew Holdsworth, Senior Director of Oracle’s Real World Performance (RWP) team. He showed us how soft parsing, hard parsing and direct logon/off from app (no using connection pool) to degrade the db performance (comparing with that without any parsing at all).