Showing results for 
Search instead for 
Do you mean 

Problem Outputting Features to Oracle ORA-29875 ODCIINDEXINSERT

by Technical Evangelist ‎04-13-2017 02:27 PM - edited ‎04-13-2017 02:53 PM (2,810 Views)


Output to Feature Classes command seems to hang when outputting new feature class to Oracle but if left long enough may result in the following message:

Unable to create table or output all features for one or more feature classes.
Refer to log file: C:\Warehouses\\GMOTTS.log for details.


The C:\Warehouses\GMOTTS.log file may contain the following error:

Error: Unable to update the record. (Error: Could not insert a record in the databaseORA-29875: failed in the execution of the ODCIINDEXINSERT routine )


C:\Temp\GOracle.log file if present (used to record client to server requests) may show the the following error:

Database Error Number: 29875
Database Error Message: ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
ORA-13033: Invalid data in the SDO_ELEM_INFO_ARRAY in SDO_GEOMETRY object
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 720
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 225


The ORA-29875 error can occur for records where the source geometry is defined as Composite Geometry but the source composite geometry contains only a single member. For example, the error would occur when attempting to output linear data where one or more of the geometries are defined as "Composite Polyline Geometry" yet erroneously contain only a single Polyline Geometry member. In such cases, GeoMedia passively permits the single member, composite geometry but Oracle expected more than one geometry component for populating a SDO multi geometry type, thus the insert into Oracle will fail.


It should be noted that these geometry conditions do not typically occur for data created (inserting, editing etc.) by GeoMedia. Such conditions typically occur from geometry created by other read-only data sources such as CAD connections.


One solution to correct the data is to use the COMPRESS function to simplify the geometry prior to output to using output to feature classes command. For example, if the data is stored in a read-write warehouse, the Vector > Update > Update Attributes command could be used to update the originating geometry field using a COMPRESS expression.

COMPRESS (Geometry Field Name)





Example Workflow using Functional Attributes Query:
The following workflow can be used for read-only or read-write data sources to generate a functionally compressed geometry in a query that could be used a input to Output to Feature Classes command.

  1. Use the Analysis tab > Functional Attributes command to build a new functional attribute using the compress function.
    Example: COMPRESS(Input.Geometry)
  2. Use the functional attribute query as input to Manage Data > Output to Feature Classes command. Use the Advanced tab to select (row selection on far left) the output query. Doing so will allow you to use the Select Source Attributes button to unselect the originating geometry field and optionally rename the functional geometry field. Hint: If appending to an existing feature class in oracle, use the Rename option to rename the functional geometry to match the target geometry field name.