laptop and a wrench

Bug

Spatial Type for Oracle: Creating a st_geometry spatial index encounters an Oracle memory leak using reference cursors.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM035855
SubmittedJune 4, 2008
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.3
StatusWill Not Be Addressed

Description

Creating a spatial index on an st_geometry attribute can fail with Oracle error ORA-04030 when allocating 16332 bytes (pga heap, kgh stack).

"SQL> CREATE INDEX shape_idx ON parcels (shape)
2 INDEXTYPE IS sde.st_spatial_index
3 PARAMETERS ('st_grids=1000 st_srid=1');
CREATE INDEX shape_idx ON parcels (shape)...
*
ERROR at line 1:
ORA-29858: error occurred in the execution of ODCIINDEXALTER routine
ORA-04030: out of process memory when trying to allocate 16332 bytes (pga heap,kgh stack)
ORA-06512: at "SDE.ST_DOMAIN_METHODS", line 1092
ORA-06512: at "SDE.ST_DOMAIN_METHODS", line 1820".

Cause

There is an Oracle memory leak when using a reference cursor and the BULK COLLECT option to fetch a result set. Each iteration of the fetch operation leaks additional memory, which can potentially lead to the Oracle ORA-04030 error.

The Oracle administrator can identify the memory usage when a session is creating a spatial index by executing the following query as the SYS or SYSTEM user for the session and executing the CREATE INDEX statement.

Code:
SELECT n.name, s.value
FROM v$statname n , v$sesstat s
WHERE s.sid = <session's sid>
AND n.statistic# = s.statistic#
AND n.name IN ('session pga memory','session pga memory max')

When the CREATE INDEX operation completes and the reference cursor has been closed, the memory is released.

Workaround

If this error is encountered when creating a spatial index or alter an existing spatial index with the rebuild clause, please contact ESRI Technical Support and reference this ESRI Knowledge Base article.

    Steps to Reproduce

    Bug ID: NIM035855

    Software:

    • No Product Found

    Get notified when the status of a bug changes

    Download the Esri Support App

    Discover more on this topic

    Get help from ArcGIS experts

    Contact technical support

    Download the Esri Support App

    Go to download options