title: Oracle 11g ORA-13226: interface not supported without a spatial index
body: <p>I am trying to run this query:</p>
  
  <pre><code>select count (st.STANDID) as "stand view"
  from STANDT st
  where mdsys.sdo_filter(st.STANDGEOM,
  mdsts.sdo_geometry(2003,null,null,
  mdsys.sdo_elem_info_array(1,3,3),
  mdsys.sdo_ordinate_array(0,0,20,20)),
  'querytype=window') = 'TRUE';
  </code></pre>
  
  <p>On this table:</p>
  
  <pre><code>create table StandT(
  StandId number constraint StandId primary key,
  StandGeom mdsys.sdo_geometry,
  StandName varchar2(20)
  );
  </code></pre>
  
  <p>And i am getting this error:</p>
  
  <pre><code>Error report -
  ORA-13226: interface not supported without a spatial index
  ORA-06512: at "MDSYS.MD", line 1723
  ORA-06512: at "MDSYS.MDERR", line 8
  ORA-06512: at "MDSYS.SDO_3GL", line 1224
  </code></pre>
  
  <p>As message tells me, i am trying to create spatial index:</p>
  
  <pre><code>create index f_ind_STANDT on STANDT(STANDGEOM)
  indextype is mdsys.spatial_index
  parameters('sdo_level=4, sdo_numtiles=4');
  </code></pre>
  
  <p>And then i am getting this error:</p>
  
  <pre><code>Error report -
  ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
  ORA-13249: internal error in Spatial index: [mdidxrbd]
  ORA-13249: Error in Spatial index: index build failed
  ORA-13206: internal error [Tessellate] while creating the spatial index
  ORA-13249: Error in spatial index: [mdpridxtessellate]
  ORA-13200: internal error [ROWID:AAAVM/AABAAAXLZAAA] in spatial indexing.
  ORA-13019: coordinates out of bounds
  ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
  29855. 00000 -  "error occurred in the execution of ODCIINDEXCREATE routine"
  *Cause:    Failed to successfully execute the ODCIIndexCreate routine.
  *Action:   Check to see if the routine has been coded correctly.
  </code></pre>
  
  <p>However it is now visible in the <code>ALL_INDEXES</code> table:</p>
  
  <pre><code>SELECT INDEX_NAME FROM ALL_INDEXES WHERE TABLE_NAME = 'STANDT';
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/uFXI0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uFXI0.png" alt="enter image description here"></a></p>
  
  <p>Does anybody know, how can i fix these errors to make my query work?</p>