20.8.18

ORA-04031

ORA-04031 Errors Occurring (Doc ID 2063751.1)

SYMPTOMS ORA-04031 Errors Occurring

ORA-04031 errors occurring in a RAC instance with the trace file showing high memory usage for "ges resource dynamic" and "ges enqueues" memory in the shared pool.  This can cause LMD processes to become unresponsive leading to an instance termination.


The following query can be used to determine if this fix will help:

select substr(RESOURCE_NAME,instr(RESOURCE_NAME,'[',1,3)+1,2) , MASTER_NODE, count(*)   from gv$ges_resource   where substr(RESOURCE_NAME,instr(RESOURCE_NAME,'[',1,3)+1,2) in ('DX', 'BB')   group by substr(RESOURCE_NAME,instr(RESOURCE_NAME,'[',1,3)+1,2), MASTER_NODE    order by 3 desc;


If that shows a large number of entries (much larger than the expected total number of transactions), then this fix will help.

CAUSE for ORA-04031


This is due to unpublished bug:21373473 fixed in 12.2, and occurs due to DX and BB locks being cached but not cleared out.  This fix removes the need to cache DX and BB locks and hence reduces overall shared pool memory usage in RAC instances.

ORA-04031 errors occurring with high memory utilization for "ges enqueues" & "ges resource dynamic" memory allocations.


SOLUTION

Download and apply the one-off patch number 21373473 (Patch:21373473) for your platform and version combination. Please note that if using 12.1.0.2, then you should also apply the related patch number 21260431 (Patch:21260431) which also impacts the shared pool memory allocations identified here.

This issue can also be worked around by setting 

_GES_DIRECT_FREE_RES_TYPE="CTARAHDXBB" in the instances.



Note:- We also found ORA-01041: internal error. hostdef extension doesn't exist in alert logs that depend on ORA-04031. also suggest opening a Service request with oracle if not sure with the above method.

Labels:

ORA-02051 Another Session Or Branch In Same Transaction Failed

ORA-02051 Another Session Or Branch In Same Transaction Failed (Doc ID 2253226.1)         

SYMPTOMS for ORA-02051 Another Session Or Branch In Same Transaction Failed.
Database performance is slow and caused   the transactions ORA-02051 another session or branch in same transaction failed or finalized

CAUSE for ORA-02051 Another Session Or Branch In Same Transaction Failed.
Session transactions branches caused the issue Excessive Waits On The Event "Global transaction acquire instance locks"

SOLUTION
Please use below sql and identified underscore parameter values for ORA-02051 Another Session Or Branch In Same Transaction Failed :
SQL>
select a.ksppinm "Parameter", b.ksppstvl "Session Value",c.ksppstvl "Instance Value"  FROM x$ksppi a,x$ksppcv b, x$ksppsv c  WHERE a.indx = b.indx AND a.indx = c.indx AND a.ksppinm LIKE '/_%' escape '/'  AND (a.ksppinm like '%clusterwide_global%' or a.ksppinm like '%disable_autotune_gtx%') ;

output:-

Parameter                                                          Session Value         Instance Value
----------------------------------------             -------------------- --------------------
_clusterwide_global_transactions             TRUE                              TRUE
_disable_autotune_gtx                                  FALSE                             FALSE


Set following to solver ORA-02051 Another Session Or Branch In Same Transaction Failed :-
alter system set "_clusterwide_global_transactions"=false scope=spfile;
alter system set "_disable_autotune_gtx"=TRUE scope = spfile;  

Note:-  bounce the instances for the changes to take effect

Oracle Mean company, not database :)

Labels: