Wednesday, April 12, 2006

ORA-03113: end-of-file on communication channel

If you happen to get this message when (spatial) querying an oracle table. Probably the spatial index is incorrect, because it has been based on wrong dim-information in the user_sdo_geom_metadata table.

- Drop the index
- Correct the diminfo in user_sdo_geom_metadata
- Rebuild the index

INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)VALUES ('table', 'LOCfld',MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X', 180000, 220000, 0.005),MDSYS.SDO_DIM_ELEMENT('Y', 380000, 450000, 0.005)),Null);

CREATE INDEX si_ITEM2D on table(LOCfld) indextype is mdsys.spatial_index

No comments: