Problem of spatial Index

I got an error while im trying to create a Spatial index on a table, ORA-29855 ODCIINDEXCREATE, error ORA-1324 in Index space: index build failed; ORA-06512 in MDSYS. SDO_INDEX_METHOD_10I: Cause cannot run the ODCIIndexCreate routine. Action: Check if the routine was coded correctly.

I insert in the MDSYS. SDO_GEOM_METADATA_TABLE these data:

INSERT INTO 'MDSYS. "" SDO_GEOM_METADATA_TABLE "(SDO_OWNER, SDO_TABLE_NAME, SDO_COLUMN_NAME, SDO_DIMINFO, SDO_SRID) VALUES ('MIGRA',"ESPACIAL","GEOM", SDO_DIM_ARRAY(MDSYS.) SDO_DIM_ELEMENT ('X', 200000, 1000000, 5-8), MDSYS. SDO_DIM_ELEMENT('Y',700000,1200000,5E-8), MDSYS. (SDO_DIM_ELEMENT('Z',0,0,5E-8)), 26717);

Validate with GeoRapto geometries in the "SPACE" table, I got some of them have problems, so I erase all records from the table and try to create the index again and has the same result "impossible to perform with success the routine ODCIIndexCreate.". I didn't add any other information related to this table. If you have an idea of what could be the problem, you can give me a hint on what do I do to fix this? Thanks in advance.

Published by: user11136667 on 07/31/2009 07:38

The SRID you use is based on the EPSG model which we left supporting 10.2.0.3.
You cannot use it in 10.1.2 release.

Siva

Tags: Database

Similar Questions

  • Problem in creating Spatial indexes

    Hello

    I am creating the Spatial index on my service. In vain.

    I created the function:

    create or replace
    FUNCTION VRAT_GEOMETRII (NUMBER obj_id)
    MDSYS RETURN. SDO_GEOMETRY
    DETERMINISTIC
    as
    MDSYS test1. SDO_GEOMETRY;
    Mt VARCHAR2 (32767).
    BEGIN
    MT: =' SELECT SDO_PC_PKG. () TO_GEOMETRY
    points,
    num_points,
    3) from pc_blktab2 WHERE obj_id =' | OBJ_ID;
    EXECUTE IMMEDIATE Mt INTO test1;
    Test1 RETURN;
    END;

    Updated metadata to update:
    INSERT INTO user_sdo_geom_metadata)
    TABLE_NAME,
    COLUMN_NAME,
    DIMINFO,
    SRID)
    VALUES)
    "PC_BLKTAB2,"
    ' st_mkara. VRAT_GEOMETRII (obj_id)',
    () SDO_DIM_ARRAY
    SDO_DIM_ELEMENT ('X', 930000000,1200000000, 10),
    SDO_DIM_ELEMENT('Y',420000000,930000000,10),
    SDO_DIM_ELEMENT ('Z', 0,1600000, 10)
    ),
    NULL - SRID VALUE
    );

    and I want to create the spatial index:

    CREATE INDEX test_blok3_idx
    ON PC_BLKTAB2 (VRAT_GEOMETRII (obj_id))
    INDEXTYPE IS MDSYS. SPATIAL_INDEX;

    but these errors:

    Error report:
    SQL error: ORA-29855: error when executing routine ODCIINDEXCREATE
    ORA-13249: internal error in the Spatial index: [mdidxrbd]
    ORA-13249: error in the Spatial index: index build failed
    ORA-13249: error in the spatial index: [mdrcrtxfergm]
    ORA-13249: error in the spatial index: [mdpridxtxfergm]
    ORA-29400: data cartridge error
    ORA-01422: exact fetch returns more than number of lines
    ORA-06512: at "ST_MKARA. VRAT_GEOMETRII', line 12
    ORA-06512: at the 'MDSYS. SDO_INDEX_METHOD_10I', line 10
    29855 00000 - "an error occurred in the execution of routine ODCIINDEXCREATE.
    * Cause: Cannot run the ODCIIndexCreate routine.
    * Action: Check if the routine was coded correctly.

    Thanks for help

    Kirin

    This looks like a problem in your function.
    Make sure that you run this function successfully for each obj_id.
    Looks for some obj_id SQL inside your function is a failure (returns more than one line).

    Siva

  • How to create Spatial indexes in SQL Developer Data Modeler 4

    Hello

    What is the procedure to create a Spatial index in SDDM v4? I found myself at an impasse because of the following problems:

    (1) retro-engineering rate the spatial index, then I need to add them manually.

    (2) adding an index does not allow me to check the 'spatial', and does not allow me to add the sdo_geometry column in the index definition.

    (3) for the registration of the spatial properties for a table, I can not choose the name of the Spatial Index.

    I came across an old post (Data Modeler - cannot create a spatial index), but this post is no longer valid because SDDM V4 does not allow me to create an index without columns (definition of the incomplete index).

    Help is appreciated,

    Kind regards

    Richard.

    Hi Richard,

    Thanks for your update.  I'm scared, I was assuming you were using the stand alone rather than SQL Developer Data Modeler.

    I tried using SQL Developer 4.1.0.18.37 (ai2) using a thin connection and got the ClassCastException you have found.

    But when I used ai2 autonomous, maker of data using the same login details 'Advanced', it worked OK and imported from the spatial index.

    (I'm puzzled as to why these two seem to behave differently, as this is the version ai2 data integrated with SQL Developer ai2 maker).

    I then plugged and reverse engineering the same tables (yet) in a new model.

    Funny is that there is no error in the external journal this time, but the spatial properties are still not retroconcues correctly.

    Is it possible that you have not set the option to import the spatial properties?  I expect that the spatial properties would be imported or that the error should be registered.

    SQL Developer ai2 imported properly the spatial properties and the spatial index, when I used a basic connection and specified host, port, and SID or Service name.

    Another issue: SQL Developer relies on a certain JDK / JDBC library?

    Any Java JDK 1.8 should be good.

    David

  • Oracle Spatial Index on a column NOT NULL

    I'm using the Oracle 11 g with data space init.

    I have a SDO_GEOM column in a table that has NULL values for some records. I have to run spatial query based on this column so the need of a spatial index on it. Is it possible to create a Spatial Index on a column SDO_GEOM even if some of them have the NULL value and results of spatial query?


    Thank you
    Alan

    Published by: user3883362 on 29 April 2013 05:59

    Alan,

    Is it possible to create a Spatial Index on a column SDO_GEOM even if some of them are NULL

    Yes.

    SQL> CREATE TABLE test (ID NUMBER PRIMARY KEY, geom MDSYS.SDO_GEOMETRY);
    
    Table created.
    
    -- "insert a row with non-NULL geometry"
    SQL> INSERT INTO test VALUES (1, SDO_GEOMETRY('POINT (6000000 2100000)', 40986));
    
    1 row created.
    
    -- "insert a row with NULL geometry"
    SQL> INSERT INTO test VALUES (2, NULL);
    
    1 row created.
    
    SQL> CREATE INDEX test_spx ON test (geom) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    
    Index created.
    

    .. .and getting results of spatial query

    Yes, assuming that your data is valid.

    -- "Creates a 10' buffer around the point we previsouly inserted then applies SDO_INSIDE"
    SQL> SELECT ID, SDO_INSIDE(geom, SDO_GEOM.SDO_BUFFER(geom, 10, 1)) FROM test;
    1 TRUE --"our point geometry"
    2 FALSE --"our NULL"
    
    2 rows selected.
    

    If you encounter problems here, I think you can use the functions that are choking in NULL values, for example, the conversion of NULL in WKT geometry.

    How do you access data (sqlplus, application, custom, etc.)? What is the query, and we see a few examples of data?

    Kind regards
    Noel

  • Spatial indexes and nulls in Geoms

    Hey gang,

    Small Question... It is valid for null in a column of sdo_geometry and index values still be valid and usable?

    I recall problems with spatial queries, for example: sdo_inside, sdo_anyinteract etc., when there are null values.

    Thank you.

    11g R2 EE w / space (obviously).

    Hi FlyingGuy,

    Yes. I used a bit NULL geometries and never encountered problems with the index, so don't think that this changed with 11R2.

    See you soon,.
    Stefan

  • Error creating the Spatial Index for SRID 8307 on newly hardened database

    Oracle 11g Rel2, Windows 2003 platform

    Help, please...

    Meeting with error message:
    ERROR on line 1:
    ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE
    ORA-13249: internal error in the Spatial index: [mdidxrbd]
    ORA-13249: geodetic initialization error turn
    ORA-13249: SRID 8307 does not exist in the table MDSYS.CS_SRS
    ORA-29400: data cartridge error
    ORA-04063: package body 'MDSYS. SDO_CS"contains errors
    ORA-06512: at the 'MDSYS. SDO_INDEX_METHOD_10I', line 10

    After running the command

    INSERT INTO USER_SDO_GEOM_METADATA VALUES
    ("PointGeometry",
    "pointGeom,"
    MDSYS.sdo_dim_array (mdsys.sdo_dim_element ('Longitude',-180, 180, 1),
    mdsys.sdo_dim_element('Latitude',-90,90,1)),
    8307
    );

    CREATE the INDEX IDX_POINTGEOMETRY on PointGeometry (pointGeom) indextype is mdsys.spatial_index parameters('LAYER_GTYPE=POINT');

    When I ask mdsys.sdo_cs I see that there are actually SRID 8307. This index was created in this schema without problem. The problem only arises once the hardened customer database and we tried to recreate the schema (and index).

    Probably not coincidentally, I also get error:
    ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE
    ORA-04063: package body "CTXSYS. DRIXMD' has errors
    ORA-06508: PL/SQL: called program unit is not found: 'CTXSYS. DRIXMD ".
    ORA-06512: at "CTXSYS. DRUE", line 145
    ORA-06512: at "CTXSYS. TEXTINDEXMETHODS', line 366
    ORA-04063: package body "CTXSYS. DRIXMD' has errors
    ORA-06508: PL/SQL: called program unit is not found: 'CTXSYS. DRIXMD ".

    When attempting to create and index Oracle Text context.

    Your help is greatly appreciated.

    Then, that's the problem.

    MDSYS user now has not run, and select privileges on the dbms_lob package.

    You must grant privileges on this package in MDSYS.

    Note that you can run into other issues of privilege package like this, so you must correct all by the granting of the
    required privileges for MDSYS.

    Siva

  • Data Modeler - cannot create a spatial index

    Good day, colleagues!

    I have a version 584 of the Modeler of Dala.

    Here is her quote Guide of Modeler of Oracle SQL Developer data:

    "Properties of spatial definition 3.82.
    ...
    Benchmark ID: Value Oracle Spatial SRID. ...
    + Create Spatial Index: Determines if a spatial index is created. +
    Name of the spatial Index: name of the spatial index.
    ..."

    I have a SDO_GEOMETRY column in my table and want to create the spatial index.

    The problem is that there is no option "Create Spatial Index" in my space definition properties window. There is only 'The Spatial Index name' option. When I am creating the spatial index manually, I can't, because the option 'Space' for index creation is not active. I checked the table option 'Save as space Table', but it also did not help.

    So, I have no way to create a spatial index. How can I do?

    Hello usamytch,

    create spatial index is confusing. We will improve it in future releases. Here are the steps:
    (1) creation of index - no need to add columns
    (2) create the spatial column definition ('space properties' in the dialog table)
    (3) in the definition of the spatial column, you can select the size of the spatial column, coordinate ID system, and you can select one of the existing indexes to be used as a space.
    (4) after this index appear as space and you can define the spatial properties in the index dialog box
    (5) you must check 'Save as space Table' in order to get meta-space data generated by DDL

    There are additional space properties, that you can set in the physical model.

    Philippe

  • How to rebuild a spatial index partition that is marked 'INPROGRS '.

    I'm on 12.1.0.1 Enterprise Edition.

    I have a very large table of sdo_geometry objects that I divided it into several partitions.  I have create a spatial index on this table as UNUSABLE and then rebuild the partitions across a few different sessions.

    In total, the construction of index takes a few days.  Last week during the construction of the index, the database crashed completely.  This left me with most of the scores with a USER_IND_PARTITIONS. USABLE STATUS, some with UNUSABLE and a couple with INPROGRS.

    I can rebuild the UNUSABLE partitions as usual, but when I try to build a INPROGRS partition I get:

    ERROR at line 1:
    ORA-29952: cannot issue DDL on a domain index partition marked as LOADING
    

    The mistake is understandable, given that the index partition was INPROGRS when the database crashed.  The question is how to recover from it.  The doco says:

    Expect that the index partition operation complete question GOLD FORCE INDEX DROP to remove question OR index an ALTER TABLE DROP PARTITION to delete the partition.

    None of these options are good for me.  I don't want to let down the entire index as most of it is built.  It doesn't seem to be an option to recover a partition of index construction which is blocked at INPROGRS.


    Support Doc ID 557600.1 addresses this issue says in the context of the Oracle text index.  Sa dit :

    Sometimes, if CREATE INDEX or ALTER INDEX fails, an index can be left with the status of LOADING or INPROGRS and let the context index in an unusable state.

    Any attempt to retrieve using SUMMARY INDEX is blocked. The only recourse is to drop and re-create the index.

    In this case, use CTX_ADM. MARK_FAILED to force LOADING failure index status so that you can retrieve the index with the INDEX of CURRICULUM VITAE.

    If the suggestion is to use CTX_ADM. MARK_FAILED ( http://docs.oracle.com/database/121/CCREF/cadmpkg.htm#CCREF0500 ). 

    There is a similar option for spatial indexes?

    Thank you

    John

    Hi John,.

    Have you tried mdsys.reset_inprog_index (owner IN varchar2, varchar2 IN index_name)?

    This procedure will erase INPROGRS and to FAIL if index or index partition is INPROGRS.

    Thank you

    Ying

  • spatial index

    I have a spatial table with an index on the geometry column.

    If I truncate the spatial table and then insert new spatial data into the table I have to delete and then recreate the spatial index?

    No, the spatial index is automatically maintained.

  • bypassing the spatial index

    Hello

    Could someone please answer questions? :

    I was reading the book 'Pro Oracle Spatial' and it has the following about phase two of filtering when using space operators:

    «In some cases, however, the optimizer to decide to bypass the spatial index.» She then calls the secondary filter (i.e., the function of geometry engine) directly on the rows in the table. (This can happen for various reasons... »

    My questions:

    (1) where can I find more information on the "variety of patterns" when this happens?

    (2) is it possible to force Oracle Spatial not use filter primary and go directly to the secondary filter? The reason why I want to do this is that I'm doing my own prior filtering that corresponds to the primary filter and I have a condition of additional query (with spatial condition), which allows to select only those that are previously filtered.

    (3) or is there another Oracle Spatial function exactly like SDO_ANYINTERACT, but applies only the secondary filter (and therefore does not require an spatial index)?

    Any help is greatly appreciated.

    Upendra

    (1) for example, select * tab where c1 = 1 and sdo_anyinteract (...) = "TRUE";

    If "c1 = 1" is very selective, say only a single line or for very little is returned.

    sdo_anyinteract (...) cannot pass through the spatial index.

    (2) you can always use the / * + full * / reference as:

    Select / * + full (a) * / * from tab where sdo_anyinteract (...) = "TRUE";

    (3) SDO_GEOM. RELATE() seems to be what you are looking for.

  • spatial index and normal index

    Hi space specialists,.

    I have a question for spatial index performance and how Oracle manages queries that have a space and regular condition combined. We are on the Oracle 10 g Enterprise Edition Release 10.2.0.4.0 database

    Take a query like this one (not a real query but based on the type of query that is generated by ArcGIS):

    Select objectid

    attribute

    geometry

    table

    where mdsys.sdo_filter (geometry, mdsys.sdo_geometry (: gtype1,: srid1, null,: elem_info1,: ordinates1), 'querytype = window') = 'TRUE '.

    and attribute = value

    In our scenario, we have a lot of rows in the table (2 million), but we have only a few lines (2000) where attribute = value.

    It seems that there is a scenario where the performance is really bad. It takes 5 seconds for the query to return the results and you're just too slow for our needs. There is a spatial index on a geometry and a normal index on the field for the attribute. The plan of the explain command shows that both the spatial index and the index of the attribute are used.

    Of course, we can break to the top of the table in separate tables by object type. This would make the index space datamodel much more efficient, but at the expense of our current simple, abstract.

    Do you have suggestions on how we can improve performance without too much impact on our datamodel? Oracle for example has an option where you can create a spatial index on a subset of the data in a table?

    Thank you!

    Rob

    Do not know whether or not the following works for your case:

    use the column range-key attribute to create a partitioned table Beach and then create a local spatial index.

  • Error in the spatial index

    Hello world

    I created a spatial index on a table, but I get the error message:

    ORA-13033: sdo_geometry sdo_elem_info_array data not available

    How can I write a SQL command to delete these unavailable records?

    Hello

    you will find an example with a similar error. Simply, you can validate spatial data, to find the invalid records:

    DROP   TABLE sdo_test;
    
    CREATE TABLE sdo_test (
      nr      NUMBER,
      GEOM     MDSYS.SDO_GEOMETRY);
    
    COMMIT;
    
    --correct
    INSERT INTO sdo_test VALUES (1,
      SDO_GEOMETRY(3302, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1),
        SDO_ORDINATE_ARRAY(-87.899771, 42.000853, 0, -87.899109, 42.000847, 54.8504622)));
    
    --correct
    INSERT INTO sdo_test VALUES (2,
      SDO_GEOMETRY(3302, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1),
        SDO_ORDINATE_ARRAY(-87.917489, 41.992077, 0, -87.917063, 41.99174, 51.4503307)));
    
    --empty SDO_ELEM_INFO_ARRAY
    INSERT INTO sdo_test VALUES (3,
      SDO_GEOMETRY(3302, 8307, NULL,  SDO_ELEM_INFO_ARRAY(),
        SDO_ORDINATE_ARRAY(-87.925704, 41.965994, 0, -87.925705, 41.965445, 60.9789892)));
    
    DELETE FROM USER_SDO_GEOM_METADATA
      WHERE TABLE_NAME = 'SDO_TEST' AND COLUMN_NAME = 'GEOM' ;
    
    INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
      VALUES ('SDO_TEST', 'GEOM',
        MDSYS.SDO_DIM_ARRAY
          (MDSYS.SDO_DIM_ELEMENT('X', -87.925705, -87.8991090, 0.001),
           MDSYS.SDO_DIM_ELEMENT('Y',  41.965445,  41.9654450, 0.001),
           MDSYS.SDO_DIM_ELEMENT('M',    0.00000,  60.9789892, 0.001)
         ),8307);
    
    --DROP   INDEX sdo_test_geom_spix;
    
    --ORA ERROR 13033
    CREATE INDEX sdo_test_geom_spix
              ON sdo_test(geom)
       INDEXTYPE IS MDSYS.SPATIAL_INDEX
    PARAMETERS('sdo_indx_dims=2');
    
    --find the invalid record
    SELECT nr, SDO_GEOM.VALIDATE_GEOMETRY(geom,0.001) val
      FROM sdo_test; 
    
    nr     val
    -----------------------
    1    TRUE
    2    TRUE
    3    13033
    

    Oops - where is the preview in the new design?

    Found while waiting for the syntax highlighting (-> switch to the Advanced Editor, paste your code, mark it, click on the > button (insert), select syntax highlighting, choose style... >)

  • Melody oracle spatial index

    Hello world

    How to give a spatial index in oracle? Pls advice


    Thanks in advance

    It is a very open ended question. When you post questions on this forum you will get better results if you have very specific questions. If you have a specific spatial query is not performing well? If so, then as much information as you can about it.
    -Exactly which version of the Oracle database?
    -What is the SQL query that you run - whether you can include the plan of the explain command
    -What is your expected for the query response time?
    -The amount of data is in the table, and what kind of data is
    -Is it possible to provide information on the use cases behind the query that you run.

    There are different techniques available to make spatial queries perform as you would expect, but I'm not going to waste my time to go through them here until that provide useful information.

    I recommend having a look at this presentation for some tips:
    http://download.Oracle.com/otndocs/products/spatial/PDF/ow_2009/spatial_oow09_tuning_and_best_practices2.PDF
    Also take a look at this:
    http://download.Oracle.com/otndocs/products/spatial/PDF/spatial_wp09_bestprac.PDF

  • Index - Rtree spatial indexing

    Hello

    I have a spatial table. I created indexes. If I keep on inserting data in my table I rebuilt the index or data are automatically indexed?

    Hi 951616,

    Now this is interesting. Initially, I was going to say that you need the quality of your spatial index yourself, but when I lifted up the documentation for 11R2 I found a note that [url http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_objtune.htm#CACHEDCG] SDO_TUNE. QUALITY_DEGRADATION has been deprecated because

    You should not use this function. It is not needed because Spatial indexes are self-tuning.
    

    Which are new in 11R2 I guess? I have used to set up a job to keep an eye on the index for frequently changing tables, but that seems not to be necessary. So your answer is: no, you do not have :-)

    You learn something new every day :-)

    See you soon,.
    Stefan

  • Problem with CREATE INDEX script

    Hello world!
    I want to create a 3D Spatial Index. So I added a few lines (PARAMETERS ('sdo_indx_dims = 3')) in the following script, I get the error

    PLS-00103: encountered the symbol "SETTINGS" then wait for the following :), * & = - + <>.
    PLS-00103: encountered the symbol "SDO_INDX_DIMS" then wait for the following :), * & = - + <>.

    Everything works well, if I remove the PARAMETERS ('sdo_index_dims = 3').
    I know that I need a few symbols, but I'm not good in programming
    Thanks for the tips!

    -create spatial indexes
    --
    procedure create_index
    newIndex user_indexes.index_name%type;
    Start

    list_spatial_indexed_tables;
    -Find all tables containing columns and a corresponding line in user_sdo_geom_metadata
    - and without a spatial index
    for rec in spatial_index_cursor
    loop
    newIndex: = rec.table_name | '_RTREE_IDX ';
    Execute ('create index' | newIndex |) "on" |
    Rec.table_name | ' (' | rec.column_name |)
    indextype') is mdsys.spatial_index ('sdo_indx_dims = 3') SETTINGS ');
    end loop;

    list_tables_missing_sdo_data ("spatial index cannot be created");

    end create_index;

    Hello

    in a string, you must make to a single quote, two quotes, then do this:

    -- create spatial indexes
    --
    procedure create_index is
    newIndex user_indexes.index_name%type;
    begin
    
    list_spatial_indexed_tables;
    -- Find all tables containing spatial columns and a corresponding row in user_sdo_geom_metadata
    -- and without a spatial index
    for rec in spatial_index_cursor
    loop
    newIndex := rec.table_name || '_RTREE_IDX';
    run ('create index ' || newIndex || ' on ' ||
    rec.table_name || '(' || rec.column_name ||
    ') indextype is mdsys.spatial_index PARAMETERS (''sdo_indx_dims=3'')');
    end loop;
    
    list_tables_missing_sdo_data ('spatial index can not be created');
    
    end create_index;
    

    If the quotes to the parameters clause must be doubled.

    Herald tiomela
    Superconsult.nl

Maybe you are looking for