Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

using SDO_GEOMETRY

cptkirkhMay 7 2012 — edited May 9 2012
I am not sure which forum to post this on so I thought i would put it under general for now. I have followed the steps listed in this link using my own tables and data. Can someone lead me down the path to enlightenment on what i did wrong?

http://st-curriculum.oracle.com/obe/db/10g/r2/prod/datamgmt/spatial/spatial_otn.htm

When i try to build the indexes i get the following error.

SQL I ran:
REATE INDEX CLI_TEST_MAIN_SIDX ON CLIENTS_TEST(CLI_MAIN_GEO_LOCATION)
indextype is mdsys.spatial_index;
CREATE INDEX CLI_TEST_SECOND_SIDX ON CLIENTS_TEST(CLI_SECOND_GEO_LOCATION)
indextype is mdsys.spatial_index;
CREATE INDEX LOC_TEST_SIDX ON LOCATION_TEST(LOC_GEO_LOCATION)
indextype is mdsys.spatial_index;

I get this error:
ORA-06550: line 1, column 8:
PL/SQL: Statement ignored
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
ORA-06512: at line 1

when i run the query:

SELECT /*+ordered*/
CLI_RID,
CLI_FIRST_NAME,
CLI_LAST_NAME,
sdo_nn_distance (1) distance
FROM LOCATION_TEST ,
CLIENTS_TEST c
WHERE LOC_RID = 11685
AND sdo_nn
(CLI_MAIN_GEO_LOCATION, LOC_GEO_LOCATION, 'sdo_num_res=5', 1) = 'TRUE'

i get this error:
ORA-13249: SDO_NN cannot be evaluated without using index
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.PRVT_IDX", line 44
ORA-06512: at line 1


a little research has gotten me to this query.
select comp_id, control, schema, version, status, comp_name from dba_registry
where comp_id='SDO';
COMP_ID CONTROL SCHEMA VERSION STATUS COMP_NAME
SDO SYS MDSYS 10.1.0.3.0 OPTION OFF Spatial

SO how do i change status to valid?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 6 2012
Added on May 7 2012
15 comments
4,343 views