Product(s): | Exor Spatial Manager | ||
Version(s): | N\A | ||
Environment: | N\A | ||
Area: | Create | ||
Subarea: | N\A |
On Spatial index rebuilding, the errors below appear:
ORA-29858: error occurred in the execution of ODCIINDEXALTER routine
ORA-29400: data cartridge error
ORA-01403: no data found
ORA-13249: internal error in Spatial index: [mdidxrbd]
ORA-13249: Error in Spatial index: index build failed
ORA-13249: Error in spatial index: [mdrcrtxfergm]
ORA-13249: Error in spatial index: [mdpridxtxfergm]
ORA-13200: internal error [ROWID:AADshKAAaAAOpeCAAA] in spatial indexing.
ORA-13206: internal error [] while creating the spatial index
ORA-13365: layer SRID does not match geometry SRID
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 3131
This happens because there are null SRID values in spatial data.
Please note in scripts below the INDEX_NM should be changed to the index name that you have tried to rebuild. Change TABLE_NM to the table_name selected on step 1: GEOLOC -to the name of the column from this table that contains spatial data and SRID to srid value selected on step 3.
1. Connect to your data base using sql plus and find the table on which this index was created. You can use the script below:
select owner, index_name, table_name from all_indexes
where index_name = 'INDEX_NM' ;
2. Drop the index:
drop index INDEX_NM;
3. Check the SRID set for the table by selecting it from user_sdo_geom_metadata
select srid from user_sdo_geom_metadata where table_name='TABLE_NM';
4. Find the geometry srid used in this table:
select tnm.GEOLOC.sdo_srid, count(*) from TABLE_NM tnm
group by tnm.GEOLOC.sdo_srid;
5. If script above returns null srid you should update it by running following script:
update TABLE_NM
tnm set tnm.GEOLOC.sdo_srid=SRID
where tnm.GEOLOC.sdo_srid is null;
6. Commit changes:
Commit;
7. Create spatial index:
create index INDEX_NM on TABLE_NM(GEOLOC)
indextype is mdsys.spatial_index;
Original Author: | NT |