Ora-04030 pmucalm When Using Sdo_Geometry_Array (Doc ID 1380488.1)

Last updated on FEBRUARY 08, 2017

Applies to:

Oracle Spatial - Version 11.2.0.1 and later
Information in this document applies to any platform.

Symptoms

Using sdo_geometry_array to include many geometries together is failing with error ORA-4030

The procedure is:

CREATE OR REPLACE FUNCTION Set_Geometry RETURN SDO_GEOMETRY_ARRAY deterministic AS
type cursor_type is REF CURSOR;
query_crs cursor_type;
g sdo_geometry;
GeometryArr sdo_geometry_array;
BEGIN
GeometryArr := SDO_GEOMETRY_ARRAY();
OPEN query_crs FOR 'select geom From soil_data';
LOOP
FETCH query_crs into g;
EXIT when query_crs%NOTFOUND ;
GeometryArr.extend;
GeometryArr(GeometryArr.count) := g;
END LOOP;
RETURN GeometryArr;
END;
/



This is the select using the function:

SELECT SDO_AGGR_SET_UNION(Set_Geometry, 0.05) FROM DUAL;



This is the error:

ERROR at line 1:
ORA-04030: out of process memory when trying to allocate 16328 bytes (koh-kghu
sessi,pmuccst: adt/record)
ORA-04030: out of process memory when trying to allocate 16328 bytes (koh-kghu
sessi,pmucalm coll)
ORA-04030: out of process memory when trying to allocate 16328 bytes (koh-kghu
sessi,pmucalm coll)
ORA-04030: out of process memory when trying to allocate 16328 bytes (koh-kghu
sessi,pmucalm coll)
ORA-06512: at "USER1.SET_GEOMETRY", line 15


The SELECT without the SDO_AGGR_SET_UNION will also generate the error

SELECT Set_Geometry FROM DUAL;

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms