0

Using ArcMap 10.4.1 I am trying to create a query layer from an Oracle table (Oracle info at bottom). The table has no geometry column, but has x and y coordinates as double and I am trying to create the geometry on the fly by returning a geometry field.

In the 'Edit Query Layer' wizard I have the following query:

SELECT MSLINK, sdo_geometry(2001,6469, sdo_point_type(CAE_DBA.NETDVD_OPEN_MAINS.FROM_X_COORD, CAE_DBA.NETDVD_OPEN_MAINS.FROM_Y_COORD, NULL), NULL,NULL) as ShapeField FROM CAE_DBA.NETDVD_OPEN_MAINS

MSLINK is my unique identifier (Long Integer, Not nullable) ArcGIS is able to discover the spatial properties for the layer and recognizes the SQL as valid. When I try to open the Attribute Table I get the following error:

enter image description here

"Error reading OID from Table. Reading rows has been stopped. Check that the datasource is valid. Underlying DBMS error[ORA-13226: interface not supported without a spatial index".

Do I need a spatial index on the aliased Field "ShapeField"? If so, any ideas about how to do this for a query layer?

Oracle version info: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

  • The error appears to be with the OID column. Please provide more details on the column layout (of what type is the MSLINK column?) Computing geometry obn the fly is heinously expensive, especially for large tables. Please specify your row count. – Vince Nov 8 '18 at 15:31
  • MSLINK is a Long Integer data type that is NOT nullable. I am able to open the table by itself in arcmap using MSLINK as the unique identifier. – Brad Nov 8 '18 at 15:34
  • What is the Oracle data type of the column (NUMBER something) – Vince Nov 8 '18 at 15:36
  • the Oracle data type of MSLINK is: NUMBER(9,0) – Brad Nov 8 '18 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.