ORA-29855 - Error creating Spatial Index using a Stored Procedure

Hi
I am using Oracle 10gR2 database and I have written a stored procedure to create spatial index. But when i execute this function i get the following error message.
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13249: internal error in Spatial index: [mdidxrbd]
ORA-13249: Error in Spatial index: index build failed
ORA-13249: Error in R-tree: [mdrcrtscrt]
ORA-13231: failed to create index table [MDRT_217C1$] during R-tree creation
ORA-13249: Stmt-Execute Failure: CREATE TABLE FGDABZ40.MDRT_217C1$ (NODE_ID NUMBER, NODE_LEVEL NUMBER, INFO BLOB) LOB (INFO) STORE AS (CACHE) NOLOGGING PCTFREE 2
ORA-29400: data cartridge error
ORA-01031: insufficient privileges
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
ORA-06512: at line 1
ORA-06512: at "FGDABZ40.PKG_PSSDBE_APPLICATION", line 298
ORA-06512: at line 17
The tables that i am passing are registered in metadata and I am able to create indexes directly in sql plus. But when i try to create using this stored procedure, it fails.
it should be possible to create indexes using a generic function. Has any faced a similar problem?
regards
sam

Hi,
I am having a same error on Oracle 10gR2 database. When I execute the same statement in sqlplus, it works. But it gives this error when I call the procedure which has this create spatial index statement.
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13249: internal error in Spatial index: [mdidxrbd]
ORA-13249: Error in Spatial index: index build failed
ORA-13249: Error in R-tree: [mdrcrtscrt]
ORA-13231: failed to create index table [MDRT_20CDA$] during R-tree creation
ORA-13249: Stmt-Execute Failure: CREATE TABLE "SDOMGR".MDRT_20CDA$ (NODE_ID NUMBER, NODE_LEVEL NUMBER, INFO BLOB) LOB (INFO) STORE AS (CACHE) NOLOGGING PCTFREE 2
ORA-29400: data cartridge error
ORA-01031: i
Any help will be appreciated.
Thanks,
Sri

Similar Messages

  • ORA-29855 while creating spatial index

    Hello, I am having trouble creating a spatial index.
    When I execute the following:
    create index la2003geoidx on polygons("GEOMETRY1")
    indextype is mdsys.spatial_index;
    I get the error
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    I've seen a few topics in this forum that mention this error, but in my case that is the ONLY error message.

    whew. had trouble with the login.
    Hi Daniel,
    we are using 8.1.6 with the latest patches available. We have been using a spatial database for some time, but have never gotten the indexing to work. We always got wierd stuff, but now it's just the one error message.
    We are using Geomedia Pro 4 to access the data on the client end, if that makes a difference

  • Error creating spatial indexes

    I'm using oracle 10g2.
    I retrieve the following error message during spatial index creation:
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13236: internal error in R-tree processing: [failed to cluster in memory]
    ORA-13232: failed to allocate memory during R-tree creation
    ORA-13236: internal error in R-tree processing: [failed to allocate memory
    4387752 (mdrtsalloc)]
    ORA-04031: unable to allocate ORA-04031: unable to allocate 4387800 bytes of
    shared memory ("large pool","unknown object","koh-kghu sessi","kpmalloc")
    bytes of shared memory ("","","","")
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
    I've already tried to increase memory, shared and large pool, actually I have the following settings:
    Shared pool 500
    Buffer cache 200
    Large pool 200
    Pool Java 20
    I've already installed data and created spatial indexes on other machine correctly with the same data with less memory use, and I can't find any difference.
    Could anybody help me?

    Andre,
    I didn't think the , and ; in the sdo_geom_metadata would be causing the problem because he indicated that he could build indexes on other data - I assume he uses the same diminfo values for these as well. But, one can never be too sure!
    But certainly, follow what the error messages indicate.
    The Oracle Error message manual says:
    "ORA-13232: failed to allocate memory during R-tree creation
    Cause: This feature assumes a minimum of 64K memory for bulk creation.
    Action: Create the index for a small subset of the data. Then, use transactional insert operations for the rest of the data."
    The spatial manual says:
    "Before you create a spatial index, be sure that the rollback segment size and the SORT_AREA_SIZE parameter value are adequate, as described in Section 4.1.1."
    One way to change the sort area size is to alter your existing session before
    executing the create index statement. So, from 4.1.1. this can be done via:
    ALTER SESSION SET SORT_AREA_SIZE = 20000000;
    Also, do what Andre suggests. On my laptop with 1G of memory as a matter of course I change the SGA from the default to being much larger.
    regards
    S

  • Error creating Spatial Index - ORA-29855

    I have a DB in 11g that I used SQL Developer to copy to my local machine, 10g installation. I copied the same kind of databases around a lot but this is the first time I'm getting this error, when creating the spatial index.
    For this table I only copy the DDL and then run a .sql file with lot's of inserts and now I'm trying to create the spatial index.
    So I tried:
    CREATE INDEX location_spatial_idx ON location(locationcoordinates) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    And got:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13203: failed to read USER_SDO_GEOM_METADATA view
    ORA-13203: failed to read USER_SDO_GEOM_METADATA view
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
    My DB is:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    I tried running the create index as SYSDBA with no luck.
    select * from mdsys.sdo_index_metadata_table -> empty for this user owner
    select sdo_index_name from user_sdo_index_metadata -> empty
    SELECT * FROM SDO_INDEX_METADATA -> empty
    So... any clue on what I'm doing wrong?

    user10768987 wrote:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13203: failed to read USER_SDO_GEOM_METADATA view
    So... any clue on what I'm doing wrong?I would think that Oracle is quite clearly telling you what is wrong here: Your table is not in the metadata.
    If you simply create the DDL for the table and create the insert statements from SQL Developer, it won't create the insert into user_sdo_geom_metadata....
    And in order to create a spatial index, the table MUST be in the user_sdo_geom_metadata, whether you try to create the index as SYSDBA or as the owner of the table.
    Regards,
    Stefan
    Edited by: Stefan Jager on Jun 4, 2013 9:14 AM

  • ERROR creating spatial index

    Hi all.
    I have a problem during the creation of a spatial index for a table column.
    The metadata is in the USER_SDO_GEOM_METADATA VIEW, but Oracle throws the message:
    ORA-29855: se ha producido un error en la ejecución de la rutina ODCIINDEXCREATE
    ORA-13203: fallo al leer la vista USER_SDO_GEOM_METADATA
    ORA-13203: fallo al leer la vista USER_SDO_GEOM_METADATA
    ORA-06512: en "MDSYS.SDO_INDEX_METHOD_10I", línea 10
    The code that i use to create the index is:
    DELETE FROM USER_SDO_GEOM_METADATA;
    INSERT INTO USER_SDO_GEOM_METADATA
    VALUES (
    'E011_CIUDADES',
    'F011_GEO',
    MDSYS.SDO_DIM_ARRAY(
    MDSYS.SDO_DIM_ELEMENT('Longitud', -180, 180, 10), -- 10 meters tolerance
    MDSYS.SDO_DIM_ELEMENT('Latitud', -90, 90, 10) -- 10 meters tolerance
    8307 -- SRID for 'Longitude / Latitude (WGS 84)' coordinate system
    CREATE INDEX IX_SPATIAL_011_GEO
    ON SYSTEM.E011_CIUDADES(F011_GEO)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX
    PARAMETERS ('tablespace=ASOUSU');
    I will apreciate any help. Thanks.

    This is very bad:
    CREATE INDEX IX_SPATIAL_011_GEO ON SYSTEM.E011_CIUDADES(F011_GEO)
      INDEXTYPE IS MDSYS.SPATIAL_INDEX PARAMETERS ('tablespace=ASOUSU');It means you've stored spatial data in the SYSTEM user's schema, which, as noted, is mucho malo. Either that, or it is a typo and that is why you got: fallo al leer la vista USER_SDO_GEOM_METADATA

  • ORA-13282 on creating spatial index

    Hello
    I want to create a Spatial Index on a GeoRaster Table.
    First i updated the USER_GEOM_METADATA table:
    Insert Into MDSYS.USER_SDO_GEOM_METADATA
    Values ('LGVHH05', 'GEORASTER.SPATIALEXTENT', SDO_DIM_ARRAY(
         SDO_DIM_ELEMENT('Rechtswert',3500000,3600000,1),
         SDO_DIM_ELEMENT('Hochwert',5900000,6000000,1) ) , 31467);
    Then creating the index:
    CREATE INDEX LGVHH05_geor_ix ON LGVHH05(GEORASTER.SPATIALEXTENT) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    And it gets me these Errors: ORA-29855, ORA-13282, ORA-06512
    WKT for 31467:
    PROJCS["DHDN / Gauss-Kruger zone 3", GEOGCS [ "DHDN", DATUM ["Deutsches Hauptdreiecksnetz (EPSG ID 6314)", SPHEROID ["Bessel 1841 (EPSG ID 7004)", 6377397,155,299,1528128], 598,1, 73,7, 418,2, ,2019999999999997917713955639905056624381, ,0449999999999999536124396058394690832164, -2,4549999999999974693008718296865910954
    7, ,9999933], PRIMEM [ "Greenwich", 0.000000 ], UNIT ["Decimal Degree", 0.017453
    29251994328]], PROJECTION ["3-degree Gauss-Kruger zone 3 (EPSG OP 16263)"], PARAMETER ["Latitude_Of_Origin", 0], PARAMETER ["Central_Meridian", 9], PARAMETER ["Scale_Factor", 1], PARAMETER ["False_Easting", 3500000], PARAMETER ["False_Northing", 0], UNIT ["Meter", 1]]
    The funktion sdo_cs.validate_wkt(31467) gets me FALSE(160);
    Now the question. Where is the failure?

    It looks like you have a problem with the decimal "delimeter" point vs comma.
    at position 160 in the WKTEXT, details on speroid
    this is how this SRID looks like (returning TRUE on validation):
    PROJCS["DHDN / Gauss-Kruger zone 3", GEOGCS [ "DHDN", DATUM ["Deutsches Hauptdreiecksnetz (EPSG ID 6314)", SPHEROID ["Bessel 1841 (EPSG ID 7004)", 6377397.155, 299.1528128], 598.1, 73.7, 418.2, .2019999999999997917713955639905056624381, .0449999999999999536124396058394690832164, -2.45499999999999746930087182968659109547, .9999933], PRIMEM [ "Greenwich", 0.000000 ], UNIT ["Decimal Degree", 0.01745329251994328]], PROJECTION ["3-degree Gauss-Kruger zone 3 (EPSG OP 16263)"], PARAMETER ["Latitude_Of_Origin", 0], PARAMETER ["Central_Meridian", 9], PARAMETER ["Scale_Factor", 1], PARAMETER ["False_Easting", 3500000], PARAMETER ["False_Northing", 0], UNIT ["Meter", 1]]
    Luc

  • Creating Spatial Index using Cross Schema Operations

    All,
    When logged on as SCOTT, I'd like to create a spatial index for JACK.
    I've tried lots of things and googled a lot, but so far I failed.
    I am using Oracle 11g R1
    In the end, what I do is (assuming this should work):
    Logon as scott/tiger
    then
    CREATE USER JACK IDENTIFIED BY JACK;
    GRANT CREATE TABLE TO JACK;
    GRANT DBA TO JACK;
    CREATE TABLE JACK.JTABLE (GEOM MDSYS.SDO_GEOMETRY);
    ALTER SESSION SET CURRENT_SCHEMA = JACK;
    INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, SRID, DIMINFO) VALUES('JTABLE', 'GEOM', 27700, SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', 1, 671196, 0.5), SDO_DIM_ELEMENT('Y', 6645, 1230275, 0.5)))
    CREATE INDEX JACK.JINDEX ON JACK.JTABLE(GEOM) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    -- This fails as it can't find any USER_SDO_GEOM_METADATA
    select * from all_sdo_geom_metadata where table_name = 'JTABLE';
    -- Result is 0 records, where is my record?
    select * from mdsys.sdo_geom_metadata_table where sdo_table_name = 'JTABLE';
    -- Returns 1 record, SDO_OWNER = SCOTTNow this is a simplified example, all I want is from a single connection, manage multiple schema's.
    The problem really lies with the INSERT trigger of USER_SDO_GEOM_METADATA
    The view uses the CURRENT_SCHEMA for retrieving data:
    CREATE OR REPLACE FORCE VIEW "MDSYS"."USER_SDO_GEOM_METADATA" ("TABLE_NAME", "COLUMN_NAME", "DIMINFO", "SRID")
    AS
      SELECT SDO_TABLE_NAME TABLE_NAME,
        SDO_COLUMN_NAME COLUMN_NAME,
        SDO_DIMINFO DIMINFO,
        SDO_SRID SRID
      FROM SDO_GEOM_METADATA_TABLE
      WHERE sdo_owner = sys_context('userenv', 'CURRENT_SCHEMA');which is fine, but the INSERT, UPDATE and DELETE triggers use:
    EXECUTE IMMEDIATE 'SELECT user FROM dual' INTO tname;A default installation has only select permision on the table and the all_... view, so I'd not like to change this
    (as we can't change this for every customer installation).
    Any help or advice please.

    Hi
    I must say I have not yet ran into the scenario like yours, nor did I read any specific documentation on it.
    As metadata is (describing) data about the (spatial) data, I would see it as belonging to it, hence also the need to have the schema that holds the (spatial) data is the schema that describes this data.
    But I would rather see the Oracle guys confirming this, as I might be just mistaken completely.
    I quickly tried something like (note the schema.tablename):
    as user scott:
    insert into user_sdo_geom_metadata values
    ('JACK.JTABLE','GEOM', 27700, SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', 1, 671196, 0.5), SDO_DIM_ELEMENT('Y', 6645, 1230275, 0.5))).
    And then follow the usage as described in section 5.1.2, but this seems to raise other issues for the index creation not being able to read the user_sdo_geom_metadata view (ORA-13203) which seems to indicate that the previous insert is not being a good one I would think.
    The alter schema approach does not help for the reason that the user_sdo_geom_metadata has triggers on it for insert, delete and update.
    If you look at the insert trigger: SDO_GEOM_TRIG_INS1
    you will see that this will do something like:
    'SELECT user FROM dual' into tname;
    to use the user to publish down the sdo_geom_metadata table.
    So for what it is worth I would create the metadata as user Jack and apply 5.1.2.
    Luc

  • SDO_GEOM error creating spatial index

    Hi,
    We are attempting to create a spatial index on column, GEOM, for a transit lines table but got the error "SDO_Geometry is not a valid column type for use in a text index". The source data is a shapefile. We used both FME and an Oracle conversion tool to convert the shapefiles into an Oracle table (both methods led to the same error). We also created the metadata and validated the geometry.
    Has anyone had this issue?
    Thanks,
    Renee

    If you have issues, best is to copy also your sql statements and error messages to your post.
    Have you tried creating your index with the following syntax?
    CREATE INDEX your_index_name ON your_table_name(geom)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX

  • Errors when creating spatial index

    Hi,
    I am new to OTN and oracle technology. I met a problem as I wanted to create a spatial index.
    I created a table 'geoobject' with a column 'shape' of sdo_geometry.
    The I run the following script:
    insert into user_sdo_geom_metadata values ('geoobject', 'shape',
    mdsys.sdo_dim_array(
    mdsys.sdo_dim_element('latitude', 0.0000, 50.0000, 0.000050),
    mdsys.sdo_dim_element('longitude', 0.0000, 80.0000, 0.000050)), 8265
    after that I insert data into the table:
    update geoobject set shape=
    mdsys.sdo_geometry(2001, 8265,
    mdsys.sdo_point_type
    (to_number((select latitude from temp_location where temp_location.gid = geoobject.geo_id)),
    to_number((select longitude from temp_location where temp_location.gid = geoobject.geo_id)), null),
    null, null);
    Then I wanted to create the spatial index:
    create index geoobject_idx on geoobject(shape)
    indextype is mdsys.spatial_index;
    But I got the error messages:
    Error in line 1:
    ORA-29855: Fehler bei Ausführung der Routine ODCIINDEXCREATE (Error at running routine ODCIINDEXCREATE)
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13230: Temporäre Tabelle [temp-table: M2_7A21$$] konnte während Erstellen von R-Baum nicht erstellt werden
    (temporary tables could not be established when R-tree was generated)
    ORA-29400: Data Cartridge-Fehler
    ORA-01659: Kann MINEXTENTS über 2 in Tablespace AMSDB hinaus nicht zuweisen
    ORA-06512: in "MDSYS.SDO_INDEX_METHOD_9I", Zeile 7
    ORA-06512: in Zeile 1
    I read some messages from the OTN forum and got to know to test the data with the following script:
    SELECT geo_id FROM geoobject
    WHERE SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(shape, .005) <> 'TRUE';
    All data passed this test.
    Could somebody give me some suggestions?
    regards,
    Yiwei

    My spatial index has been successfully generated after i enlarged the tablespace. But I encounter a new problem.
    I have saved many points in the table. I can use oracle spatial analyzer to see all the points. But as I tried to run the following query according to the examples in the oracle spatial user guider, I always get error messages. I have no idea about which problems there might be.
    The Query is:
    select geo_id, geo_name from geoobject g
    where mdsys.sdo_filter
    (g.shape, mdsys.sdo_geometry
    (2003, null, null,
    mdsys.sdo_elem_info_array(1, 1003, 1),
    mdsys.sdo_ordinate_array(25.00, 60.00, 25.00, 70.00, 35.00, 70.00, 35.00, 60.00, 25.00, 60.00)
    ), 'querytype=WINDOW') ='true'
    and sdo_relate
    (g.shape, mdsys.sdo_geometry
    (2003, null, null,
    mdsys.sdo_elem_info_array(1, 1003, 1),
    mdsys.sdo_ordinate_array(25.00, 60.00, 25.00, 70.00, 35.00, 70.00, 35.00, 60.00, 25.00, 60.00)
    ), 'masktype=TOUCH querytype=WINDOW') ='true';
    The error messages are:
    ERROR in line 1:
    ORA-29902: Fehler bei der Ausführung von Routine ODCIIndexStart()
    ORA-13207: Falsche Benutzung des Operators [SDO_FILTER]
    ORA-06512: in "MDSYS.SDO_INDEX_METHOD_9I", Zeile 368
    ORA-06512: in Zeile 1
    I use SRID = 8307, I want to use Geodetic Coordinate Support. For that reason, as I insert the information into the database, I just insert '8307' as the SRID both in the geo table and in the table user_sdo_geom_metadata. Except for that I did nothing which seems to be related to support geodetic coordination system. I think the problems might be here.
    I am looking forward to helps.
    Yiwei

  • Numeric character problems when creating spatial index

    Hi,
    We have run into a problem when trying to create spatial indexes. The problem seems to be that an mdsys-procedure tries to use a number with a comma as decimal symbol in an update statement
    Error message:
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Stmt-Execute Failure: begin mdsys.prvt_idx.execute_update(NULL,NULL,'set sdo_rtree_quality = 1,00000000 where UPPER(sdo_index_owner) = UPPER(''BK'') AND UPPER(sdo_index_name)=UPPER(''TEST_RTREE_IDX'') AND UPPER(sdo_index_table)=UPPER(''MDRT_8120$'')',NULL); end;
    ORA-29400: data cartridge error
    ORA-01747: invalid user.table.column, table.column, or column specification
    ORA-06512: at "MDSYS.PRVT_IDX", line 17
    ORA-06512: at line 1
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
    ORA-06512: at line 1
    Our problem seems to be identical to the one discussed in this thread: create RTREE falied on 9.2.0.4
    Regional settings, language versions etc:
    Client:
    OS: Windows 2000
    Regional options (OS): Swedish, Sweden
    Sqlplus (console and windows versions): v 9.2.0.1.0
    Registry: NLS_LANG =SWEDISH_SWEDEN.WE8MSWIN1252
    Server:
    OS: Windows Server 2003
    Regional options (OS): Swedish, Sweden
    Oracle: v 9.2.0.3.0
    Registry: NLS_LANG =SWEDISH_SWEDEN.WE8MSWIN1252
    We have also tried building the indexes after overriding these settings by setting the environment variables NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 on both the client- and the server computer. This gives exactly the same error. We have tried setting NLS_NUMERIC_CHARACTERS to '.,' instead of ',.', but this does not help either.
    We haven't tried changing the NLS_LANG registry entry on the server, because this is a production server at a customer's site that hosts several other databases, so we would prefer not to have to restart it if we can avoid it. However, as we understand it, the environment variable NLS_LANG should override the registry setting anyway, right?
    We first experienced the problem when trying to build indexes on imported data. To verify that the problem was not with the data, we wrote a simple test script that:
    1)Creates a table
    2)Creates metadata
    3)Inserts a simple geometry
    4)Tries to create an index
    The error message above is from running this script. We have verified that the script
    works ok on another database server.
    Below are the values of some of the language parameters right before running the script
    (we have tried many other settings with the same result).
    parameter...........................db................................instance...............session
    NLS_CHARACTERSET.......WE8MSWIN1252..................................................
    NLS_LANGUAGE...............AMERICAN...................AMERICAN...........AMERICAN
    NLS_NCHAR_CH...............AL16UTF16 ..........................................................
    NLS_NCHAR_CONV... ......FALSE..........................FALSE..................FALSE..
    NLS_NUMERIC_CH...---------.,---------------------------------------------------------------.,
    NLS_TERRITORY..............AMERICA......................AMERICA..............AMERICA
    The guy who started the thread referenced above solved the problem, but we haven't been able to get it working by changing registry entries and session parameters.
    The question is: Which setting will make the number in 'set sdo_rtree_quality = 1,00000000...' be generated with a . instead of a , as decimal symbol?

    Ok, so here is my plan to solve this:
    1) Change the default user locale (the language under "standards and formats") to English for the account under which the Oracle server runs.
    2) Reboot (or is there an easier way to make Oracle reload the settings?)
    This should make the index creation work. It may break something else however, so to avoid this I can set the user locale back to Swedish afterwards .
    You can subsequently change the setting and update the sdo_rtree_quality in
    the metadata and it should work fine. Do you mean I have to update the sdo_rtree_quality in some way to make it work after I have changed the default user locale back to Swedish? How do I do this?
    Thanks a million both of you!

  • ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine

    I am receiving the following error from FME(safe software) when creating a spatial index. I have ruled out several of the common causes as reported in this forum because the procedure works for dataset with 300,000 rows of less but fails with the full dataset of 455,412 rows.
    I am using 10G 10.2.0.2.0 - 64bi
    Any hints/tips would be much appreciated.
    Thanks
    Richard
    -----Error text follows ----------------------------------------------------------------------------------------
    Executing SQL statement `CREATE INDEX CARTO_TEXT_LL_IXS ON CARTO_TEXT_LL(GEOM) INDEXTYPE IS MDSYS.SPATIAL_INDEX' to create spatial index on Oracle table
    Executing SQL statement `DROP INDEX CARTO_TEXT_LL_IXS FORCE' to clean up failed spatial index creation
    Database Writer: Translation aborted -- rerun specifing "ORACLE8I_2_START_TRANSACTION 227"
    Execution of statement `CREATE INDEX CARTO_TEXT_LL_IXS ON CARTO_TEXT_LL(GEOM) INDEXTYPE IS MDSYS.SPATIAL_INDEX' did not succeed; error was `ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-29400: data cartridge error
    Error - OCI_NODATA
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10

    Thank you both for replies.
    The error does ocurr when I try to create the index from SQL, see message text below.
    With the spatial index creation disabled in FME the run completes sucessfully, so the data is ok, well thats a maybe.
    So I omitted the first 200,000 input rows and ran the last 255,413 rows and the index was sucessfully created (in FME) so now I conclude that the data IS ok (I had previously done a successful run with the first 300,000 rows)
    Therefore I am thinking that my database has a problem when it is asked to create a spatial index with the full 455,412 rows. Could this be configuration, a space problem . . . .
    Any more suggestions?
    Thanks
    Richard
    =Error when running from SQL =====================================
    SQL> CREATE INDEX CARTO_TEXT_LL_IXS ON CARTO_TEXT_LL(GEOM) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    CREATE INDEX CARTO_TEXT_LL_IXS ON CARTO_TEXT_LL(GEOM) INDEXTYPE IS MDSYS.SPATIAL_INDEX
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-29400: data cartridge error
    Error - OCI_NODATA
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
    SQL>
    =End error message=============================================

  • Problem on creating spatial index

    Hi,
    I am newbie in Oracle Spatial and looking for help on creating spatial index
    I am working on OpenStreetMap data. I intended to import the OSM data from PostGis to Oracle Spatial. This code is executed to import the data
    ogr2ogr -f OCI OCI:osm/password@pdborcl PG:"host=localhost user=postgres password=password dbname=gis port=5432" -lco OVERWRITE=yes -lco SRID=8307 -nln planet_osm_polygon planet_osm_polygon
    However, I got this error when importing the data.
    ERROR 1: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    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:AAAW/iAAQAAAIfsAAP] in spatial indexing.
    ORA-13206: internal error [] while creating the spatial index
    ORA-13033: Invalid data in the SDO_ELEM_INFO_ARRAY in SDO_GEOMETRY object
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
    in CREATE INDEX "OSI_12283" ON PLANET_OSM_POLYGON("ORA_GEOMETRY") INDEXTYPE IS
    MDSYS.SPATIAL_INDEX
    This creating index failure only happen when I tried to import planet_osm_polygon table. I did not get this error when I imported the planet_osm_point, planet_osm_roads and planet_osm_line and indexing worked fine. The geometry type of column which was failed to index is ST MultiPolygon ( I am not sure if this is the cause).
    Apparently, the data is imported to database. I tried to create index on that table, and it returns the same error.
    CREATE INDEX PLANET_OSM_POLYGONI ON PLANET_OSM_POLYGON(ORA_GEOMETRY)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    Please help!

    Hi Ivan Bush
    Thank you for the reply.
    Sorry for the lengthy reply. To be honest, I dont understand how to read query result. This is the query that I executed:
    select * from (select sdo_geom.validate_geometry_with_context(p.ora_geometry, 0.05) from planet_osm_polygon p) where rownum <100;
    And the snippet of the query result:
    Could you help me to explain the meaning of the query result? I chose 0.05 as tolerance value based on this reference (http://docs.oracle.com/cd/B19306_01/appdev.102/b14255/sdo_intro.htm#i884589) .
    Anyway, this information might be useful in solving the problem. When I imported the OSM data to PostGis, the SRID of geometry data was 900913. Since I want the data in WGS84 coordinate system, I change the SRID of the geometry data to 4326. I could perform this below-mentioned PostgreSQL query to change its SRID for geometry column in table planet_osm_point, planet_osm_roads and planet_osm_line. However, this query did not work on planet_osm_polygon one since this query does not recognize multipolygon datatype.
    ALTER TABLE planet_osm_point
        ALTER COLUMN way TYPE geometry(point,4326) USING ST_Transform(way,4326);
    So for planet_osm_polygon case, I check this post (QGIS, Postgis: Geometry type does not match column type - Geographic Information Systems Stack Exchange) and follow @dbaston's answer to change the geometry data type to generic'geometry'. Then change the SRID, and return the geometry data type to MultiPolygon.
    ALTER TABLE planet_osm_polygon ALTER  COLUMN way SET data type geometry(MultiPolygon) USING ST_Multi(way);
    Let me know if this might be the cause of the indexing problem.

  • Re: problems creating spatial index !!!!

    hi! Guys ,
    I am running Oracle 9.0.1.1.1 on windows 2000 professional.
    I am creating a spatial index on a table column.
    When i try to create it from sqlplus command prompt ..
    it errors out END OF FILE ON COMMUNICATION CHANNEL ..
    It was suggested to be run as a job using DBMS_JOB.
    I created a proc in which I use dbms_sql for creating the spatial
    index.
    I submit the proc as a job using DBMS_JOB.SUBMIT
    When I try to run the job using DBMS_JOB.RUN(32); where 32 is the
    job number it is bombing out.
    submitted as job number 32
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL> execute dbms_job.run(32);
    -29855ORA-29855: error occurred in the execution of ODCIINDEXCREATE
    routine
    ORA-13249: internal error in S
    PL/SQL procedure successfully completed.
    Could any body help me resolve the issue and succesfully create the
    spatial index ????
    I have only oracle to work on this and not any applications like Arcse.
    Heres the code ...
    create or replace procedure p_1 as
    v_cursor INTEGER;
    v_sqlstatement VARCHAR2(500);
    v_returncode INTEGER;
    BEGIN
    v_cursor := DBMS_SQL.OPEN_CURSOR;
    v_sqlstatement := 'CREATE INDEX RD_LINK_GEO_IDX ON ITN_NEW.RD_LINK_FINAL(GEOLOC)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX';
    DBMS_SQL.PARSE(v_cursor,v_sqlstatement,DBMS_SQL.V7);
    v_returncode := DBMS_SQL.EXECUTE(v_cursor);
    DBMS_SQL.CLOSE_CURSOR(v_cursor);
    commit;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line(to_char(sqlcode)||substr(sqlerrm,1,100));
    DBMS_SQL.CLOSE_CURSOR(v_cursor);
    END;
    variable v_job1 number
    set serveroutput on
    begin
    dbms_job.submit(job => :v_job1, what => 'p_1;', next_date => sysdate);
    dbms_job.run(:v_job1);
    dbms_output.put_line('submitted as job number '|| to_char(:v_job1));
    end;
    thanks,
    harish

    when i try
    begin
    execute immediate 'create index ............'
    end ;
    i get the following error
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Error in R-tree: [mdrcritbl]
    ORA-13231: failed to create index table [] during R-tree creation
    ORA-29400: data cartridge error
    ORA-01031: insufficient privileges
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
    ORA-06512: at line 1
    ORA-06512: at "ITN_NEW.P_2", line 3
    ORA-06512: at line 1
    Please help ....
    thanks,
    harish

  • Unable to create spatial index

    I have a spatial table called ROAD11
    in that table I have a MDSYS.SDO_GEOMETRY column named "GEOMETRY".
    after creating that table, I inserted a row, in the USER_SDO_GEOM_METADATA.
    Here is what is present in USER_SDO_GEOM_METADATA
    SQL> SELECT * FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME='ROAD11';
    ROAD11
    GEOMETRY
    SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X',0,20000,.000005),SDO_DIM_ELEMENT('Y,0,20000,.000005))
    1 row selected
    Now when I am trying to create an index on that table with the syntax.
    SQL> CREATE INDEX ROAD11 ON ROAD11(GEOMETRY)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    CREATE INDEX ROAD11 ON ROAD11(GEOMETRY)
    ERROR at Line 1:
    ORA-29855: error occured in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Satial index:[mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Error in Spatial index: [mdrcrtxfergm]
    ORA-13000: dimension number is out of range
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
    ORA-06512: at line 1
    This error is comeing while creating an index.
    I am useing Oracle 9i.Please help me out in solving the problem.
    Suprabuddha.

    can you post a sample geometry?

  • Execute immideate Create spatial index

    I can't create spatial index in package when use
    execute immideate
    declare
    l_res varchar2(500);
    begin
    l_res := 'CREATE INDEX INDXSDO1_elements
    ON (GEOMETRY)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX';
    execute immediate l_res;
    end;
    i get an exception:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13249: internal error in Spatial index: [mdidxrbd]
    ORA-13249: Error in Spatial index: index build failed
    ORA-13249: Error in R-tree: [mdrcrtscrt]
    ORA-13231: failed to create index table [MDRT_FC41$] during R-tree creation
    ORA-13249: Stmt-Execute Failure: CREATE TABLE "GMT_TECH".MDRT_FC41$ (NODE_ID NUMBER, NODE_LEVEL NUMBER, INFO BLOB) LOB (INFO) STORE AS (CACHE) NOLOGGING PCTFREE 2
    ORA-29400: data cartridge error
    ORA-01031: insufficient privileges
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
    ORA-06512: at "GMT_TECH.REBUILDINDEX", line 66
    ORA-06512: at line 3
    Why this happen?
    I can create index without execute immediate
    CREATE INDEX INDXSDO1_elements
    ON (GEOMETRY)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX
    Thanks!

    Have you granted 'create table' and 'create sequence' to the user? Do this explicitly rather than through a role.

Maybe you are looking for