ORA-13226

在使用SDO_WITHIN_DISTANCE(A.LOCATION,MDSYS.SDO_GEOMETRY(2001,8307,MDSYS.SDO_POINT_TYPE(113.2359818,23.16937253,0),NULL,NULL),’distance=10000′) = ‘TRUE’ 时报ORA-13226,
是因为没有建空间索引.


Oracle Spatial创建空间索引时遇到的ORA-29855是因为没有创建相应的空间元数据:

insert into user_sdo_geom_metadata(table_name,COLUMN_NAME, DIMINFO, SRID)
values(
‘GC_ROAD_SEGMENT_CH’,
‘GEOMETRY’,
MDSYS.SDO_DIM_ARRAY(
MDSYS.SDO_DIM_ELEMENT(‘X’,-180,180,0.005),
MDSYS.SDO_DIM_ELEMENT(‘Y’,-90,90,0.005)
),
8307
);

再执行空间索引创建语句:
CREATE INDEX GC_ROAD_SEGMENT_CH_SIDX ON GC_ROAD_SEGMENT_CH(GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX;

转载自:https://blog.csdn.net/fengzhihen2007/article/details/39297149

You may also like...