My Oracle Support Banner

ORA-04031 in Large Pool Executing DBMS_METADATA.GET_DDL Through Shared Server Connection (Doc ID 1271785.1)

Last updated on FEBRUARY 20, 2019

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.2.0.3 [Release 11.1 to 11.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

SELECT dbms_metadata.get_ddl('TABLE', '<TABLE_NAME>') FROM dual;



TEST CASE
=========
-- Create a test user
create user <USER_NAME> identified by <PASSWORD> default tablespace <TABLESPACE_NAME>;
grant dba to <USER_NAME>;

-- Connect to a shared server
connect <USER_NAME>/<PASSWORD>@<SID> -- Replace <SID> by a valid shared server service name.

-- Verify Session connectivity
select a.sid, a.serial#, a.server, b.spid
from v$session a, v$process b
where a.paddr=b.addr
and sid in (select sid from v$mystat where rownum=1);

  SID    SERIAL#    SERVER SPID
----- ---------- --------- -----------
   27         10    SHARED 20442    <== Shared Server


-- Create test table
create table <TABLE_NAME>(<COLUMN_NAME> varchar2(20));

-- Reproduce the error
SELECT dbms_metadata.get_ddl('TABLE', '<TABLE_NAME>') FROM dual;

ORA-04031: unable to allocate 4194352 bytes of shared memory ("large
pool","unknown object","session heap","kuxLpxAlloc")
ORA-06512: at "SYS.UTL_XML", line 330
ORA-06512: at "SYS.DBMS_METADATA_INT", line 10569
ORA-06512: at "SYS.DBMS_METADATA_INT", line 10684
ORA-06512: at "SYS.DBMS_METADATA", line 3001
ORA-06512: at "SYS.DBMS_METADATA", line 3897
ORA-06512: at "SYS.DBMS_METADATA", line 5678
ORA-06512: at line 1



TRACE FILE
The resultant trace file confirms the following functions on the call stack:

CALL STACK
----------
Error: ORA-4031 [4194352] [large pool] [unknown object] [session heap]
[kuxLpxAlloc] [] [] [] [] [] [] []
...
[04]: kghnospc [KGH]<-- Signaling
[05]: kghalf [KGH]
[06]: LpxMemAlloc []
[07]: lpxlpaxdescendant []
[08]: lpxxpgetstrval []
[09]: lpxevalcomparenset []
[10]: lpxevalexprcont []
[11]: lpxevalexpr []
[12]: LpxsCondTestCondition []
[13]: LpxsCondProcessAction []
...


Error: ORA-600 [729] [69984] [space leak] [] [] [] [] [] [] [] [] []
...
[02]: ksmuhe [KSM]<-- Signaling
[03]: ksmugf [KSM]
[04]: ksuxds [ksu]
[05]: ksudel [ksu]
[06]: opilof []
[07]: opiodr []
...

 

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.