Create local spatial index on range sub-partitions?
Is is possible to create a local spatial index on a table with range sub-partitions? We're trying to do this on a table that contains lots of x,y,z point data.
Trying to do so gives me the error: ORA-29846: cannot create a local domain index on a composite partitioned tableAccording to the spatial documentation:The following restrictions apply to spatial index partitioning:
- The partition key for spatial tables must be a scalar value, and must not be a spatial column.
- Only range partitioning is supported on the underlying table. All other kinds of partitioning are not currently
supported for partitioned spatial indexes.So there is nothing saying it can or can't be done. The examples I've seen in the documentation tend to partition based on a single value and don't use subpartitioning.
Example of what we're trying to do:SQL> SELECT * FROM V$VERSION;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
CORE 11.1.0.7.0 Production
TNS for 64-bit Windows: Version 11.1.0.7.0 - Production
NLSRTL Version 11.1.0.7.0 - Production
SQL>
SQL> --- Create a table, partioned by X and subpartitioned by Y
SQL> CREATE TABLE sub_partition_test
2 (
3 x NUMBER,
4 y NUMBER,
5 z NUMBER,
6 geometry MDSYS.SDO_GEOMETRY
7 )
8 PARTITION BY RANGE (x)
9 SUBPARTITION BY RANGE (y)
10 (
11 PARTITION p_x100 VALUES LESS THAN (100)
12 (
13 SUBPARTITION sp_x100_y100 VALUES LESS THAN (100),
14 SUBPARTITION sp_x100_y200 VALUES LESS THAN (200),
15 SUBPARTITION sp_x100_yMAXVALUE VALUES LESS THAN (MAXVALUE)
16 ),
17 PARTITION p_x200 VALUES LESS THAN (200)
18 (
19 SUBPARTITION sp_x200_y100 VALUES LESS THAN (100),
20 SUBPARTITION sp_x200_y200 VALUES LESS THAN (200),
21 SUBPARTITION sp_x200_yMAXVALUE VALUES LESS THAN (MAXVALUE)
22 ),
23 PARTITION p_xMAXVALUE VALUES LESS THAN (MAXVALUE)
24 (
25 SUBPARTITION sp_xMAXVALUE_y100 VALUES LESS THAN (100),
26 SUBPARTITION sp_xMAXVALUE_y200 VALUES LESS THAN (200),
27 SUBPARTITION sp_xMAXVALUE_yMAXVALUE VALUES LESS THAN (MAXVALUE)
28 )
29 );
Table created.
SQL>
SQL> -- Insert some sample data
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (1, 1, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(1, 1, 50), NULL, NULL));
1 row created.
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (50, 150, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(50, 150, 50), NULL, NULL));
1 row created.
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (150, 150, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(150, 150, 50), NULL, NULL));
1 row created.
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (150, 250, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(150, 250, 50), NULL, NULL));
1 row created.
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (150, 300, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(150, 300, 50), NULL, NULL));
1 row created.
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (220, 210, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(220, 210, 50), NULL, NULL));
1 row created.
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (220, 150, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(220, 150, 50), NULL, NULL));
1 row created.
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (220, 250, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(220, 250, 50), NULL, NULL));
1 row created.
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (220, 300, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(220, 300, 50), NULL, NULL));
1 row created.
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (320, 250, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(320, 250, 50), NULL, NULL));
1 row created.
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (320, 160, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(320, 160, 50), NULL, NULL));
1 row created.
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (320, 290, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(320, 290, 50), NULL, NULL));
1 row created.
SQL> INSERT INTO sub_partition_test (x, y, z, geometry)
2 VALUES (320, 320, 50, SDO_GEOMETRY(3001, 2157, SDO_POINT_TYPE(320, 320, 50), NULL, NULL));
1 row created.
SQL>
SQL> -- Create some metadata
SQL> DELETE FROM user_sdo_geom_metadata WHERE TABLE_NAME = 'SUB_PARTITION_TEST';
1 row deleted.
SQL> INSERT INTO user_sdo_geom_metadata VALUES ('SUB_PARTITION_TEST','GEOMETRY',
2 SDO_DIM_ARRAY(
3 SDO_DIM_ELEMENT('X', 0, 1000, 0.005),
4 SDO_DIM_ELEMENT('Y', 0, 1000, 0.005)
5 ), 262152);
1 row created.
SQL>
SQL> -- Create an Unusable Local Spatial Index
SQL> CREATE INDEX sub_partition_test_spidx ON sub_partition_test (geometry)
2 INDEXTYPE IS MDSYS.SPATIAL_INDEX
3 LOCAL
4 UNUSABLE;
CREATE INDEX sub_partition_test_spidx ON sub_partition_test (geometry)
ERROR at line 1:
ORA-29846: cannot create a local domain index on a composite partitioned tableThanks,
John
Ok, thanks. That's what we're planning on doing now.
SQL> CREATE TABLE partition_test
2 (
3 x NUMBER,
4 y NUMBER,
5 z NUMBER,
6 geometry MDSYS.SDO_GEOMETRY
7 )
8 PARTITION BY RANGE (x, y)
9 (
10 PARTITION p_x100y100 VALUES LESS THAN (100, 100),
11 PARTITION p_x100y200 VALUES LESS THAN (100, 200),
12 PARTITION p_x100yMAX VALUES LESS THAN (100, MAXVALUE),
13 PARTITION p_x200y100 VALUES LESS THAN (200, 100),
14 PARTITION p_x200y200 VALUES LESS THAN (200, 200),
15 PARTITION p_x200yMAX VALUES LESS THAN (200, MAXVALUE),
16 PARTITION p_x300y100 VALUES LESS THAN (300, 100),
17 PARTITION p_x300y200 VALUES LESS THAN (300, 200),
18 PARTITION p_x300yMAX VALUES LESS THAN (MAXVALUE, MAXVALUE)
19 );
Table created.
SQL>
SQL> INSERT INTO user_sdo_geom_metadata VALUES ('PARTITION_TEST','GEOMETRY',
2 SDO_DIM_ARRAY(
3 SDO_DIM_ELEMENT('X', 0, 1000, 0.005),
4 SDO_DIM_ELEMENT('Y', 0, 1000, 0.005)
5 ), 262152);
1 row created.
SQL> CREATE INDEX partition_test_spidx ON partition_test (geometry)
2 INDEXTYPE IS MDSYS.SPATIAL_INDEX
3 LOCAL
4 UNUSABLE;
Index created.
Similar Messages
-
Create a spatial index on a large table
Hi all
I think that I might be starting to push XE beyond what it is capable of, but I thought I would ask here to see if anyone has some ideas how to get around my problem.
I have a table with around 8,000,000 record in it. It has position data in it (SDO_GEOMETRY) which I would like to index. The geometry is not complex, just a single point for each record. The SQL I use is
CREATE INDEX "ANNOTATION_TEXT_SX" ON "ANNOTATION_TEXT" ("GEOLOC") INDEXTYPE IS "MDSYS"."SPATIAL_INDEX"
The command fails, due to memory issues. The errors thrown are
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 7272216 (mdrtsalloc)]
ORA-04031: unable to allocate ORA-04031: unable to allocate 7272264 bytes of shared memory ("lar
I have done a bit of reading up, this type of error generally occurs when the tablespace runs out of memory. Since I am using the SYSTEM tablespace, I figure I am running it out to its capacity before the index is completed.
I have not created any other tablespaces. Is this an option to allow the creation of the index? Storage and Memory are at about 60% capacity (due to this one table) so is it just too big to create a spatial index on in XE? Am I barking up the wrong tree?
Cheers
JamesGood to see you are not using the SYSTEM tablespace. (And no need to apologize too profusely for being new at this - we all were at one time.)
It normally doesn't matter how many rows are involved. The issue is how much actual space those rows require. 8,000,000 rows is actually not a lot in the GIS world, esp. if all you have is simple point data. Using the sdo_point field instead of the arrays should be a lot more compact as well.
Some steps I would take:
- Identify the actual amount of space used, in total as well as by tablespace. (One of the web-based admin screens can show you this.)
- Load it all up usnig the free 'developer license' Enterprise Edition insead of XE just to verify it'll work.
- Try indexing a smaller data set and see whether that works. (Export the table first) Delete about 1/2 rows and try indexing.
The ORA-04031 is really telling you something about the SGA is not big enough. One of the SGA pools is trying to extend by 7M. Post the info about your SGA, as well ass some details about your machine (disk/processor/total memory)
Message was edited by:
forbrich
The actual error causing the problem is the last line. It ends with "la and the rest is cut off. Could it have said 'large pool'??? -
Creating a spatial index problem
Hi there
I have to create a table in Oracle Spatial and use it with MapInfo MapX 4.51 OCX to insert some features in it.
I read a thread in the MapX forum where I learnt that I had to create my table (CREATE TABLE statement), add a record in MAPINFO_MAPCATALOG table, and then add a line to the SDO_GEOM_METADATA_TABLE table. With this, I can add some features in the table by MapInfo, and I can use the INSERT clause in Oracle. Well. But when I try to use the table in MapX, I can't even load it nor insert a feature : I have an Oracle error saying "ORA-13226 interface not supported without a spatial index".
When creating a spatial index in Oracle, I have got this message :
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13203: failed to read USER_SDO_GEOM_METADATA table
ORA-13203: failed to read USER_SDO_GEOM_METADATA table
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
ORA-06512: at line 1
The index is still created but marked at FAILED, so it is now impossible to insert features in it (even by INSERT clause).
The newly created table is empty, and it was created on the basis of another existing table. The records added in SDO_GEOM and MAPINFO_MAPCATALOG were copies of the records concerning the source table.
And I have finally granted SELECT and UPDATE on SDO_GEOM_METADATA_TABLE table and USER_SDO_GEOM_METADATA view to the user doing the operations.
Any clue ? I am using MapX 4.51 and Oracle 9.2.0.1.0.
Thank you for any idea. I am puzzled.Hi,
There is something wrong with accessing metadata.
To identify where the problem is:
- run the create-index from sqlplus (and not from mapx)
- check whether the user creating the index can
see the metadata from user_sdo_geom_metadata. (This
user also needs create-table, create-sequence privs).
Let us know what happens.
- Ravi. -
Problems creating a spatial index
I have tried to create spatial indexes the same way that the MapInfo Easy Loader does but when I issue the following sql:
CREATE INDEX SPATIAL.TEST_TABLE3_SX ON
"SPATIAL".TEST_TABLE3(GEOMETRY)
TABLESPACE SYSTEM PCTFREE 0
I get the following error message:
The following error has occurred:
ORA-02327: cannot create index on expression with datatype ADT
Which is described further in the Oracle documentation as follows:
ORA-02327 cannot create index on expression with datatype string
Cause: An attempt was made to create an index on a non-indexable expression.
Action: Change the column datatype or do not create the index on an expression whose datatype is one of VARRAY, nested table, object, LOB, or REF.
It seems as if spatial indexing can not be performed on the GEOMETRY column. However, both columns, GEOMETRY or GEOLOC, in each table, TEST_TABLE3 created by my java app and TEST4 created by EasyLoader, has the same type: SDO_GEOMTRY.
How do I go about creating the spatial index?Hi,
ORA-13354 incorrect offset in ELEM_INFO_ARRAY
Cause: The offset field in ELEM_INFO_ARRAY of SDO_GEOMETRY references
an invalid array subscript in SDO_ORDINATE_ARRAY.
Action: Confirm that the offset is a valid array subscript in SDO_ORDINATE_ARRAY.
So your geometry definition in the SDO_ELEM_INFO has an offset to a location in
SDO_ORDINATES that doesn't exist.
The correct call signature for sdo_geom.validate_layer is:
begin
sdo_geom.validate_layer('TEST_TABLE3','GEOMETRY','KEY_COLUMN','VALIDATION_TABLE');
end;
where:
TEST_TABLE3 is the table name
GEOMETRY is the column name
KEY_COLUMN is the name of the column in the table that is a numeric key
VALIDATION_TABLE is the name of a pre-created table that has the first field
defined as a numeric and the second field defined as varchar2(10), e.g.:
create table validation_table (id number, status varchar2(10));
If you don't have a numeric key then you can't run this procedure, and perhaps
to should run validate_geometry for each geometry in the layer:
CREATE TABLE validation_results as
SELECT SOME_KEY_FIELD,
SDO_GEOM.VALIDATE_GEOMETRY(s.geometry,
(SELECT diminfo
FROM user_sdo_geom_metadata
WHERE table_name = 'TEST_TABLE3'
AND column_name = 'GEOMETRY')) STATUS
FROM TEST_TABLE3 s;
SELECT * FROM validation_results
WHERE status <> 'TRUE';
You can look at values in the SDO_ELEM_INFO field by doing the following:
select a.geometry.sdo_elem_info from test_table3 a
where (info that resticts the select to the row you are interested in); -
Data Modeler - can't create a spatial indexes
Good day, colleagues!
I have a 584 release of Dala Modeler.
Here is the cite from Oracle SQL Developer Data Modeler Guide:
"3.82 Spatial Definition Properties
Coordinate System ID: Oracle Spatial SRID value. ...
+Create Spatial Index: Controls whether a spatial index is created.+
Spatial Index Name: Name for the spatial index.
I have a SDO_GEOMETRY column in my table and want to create spatial index.
The problem is that there is no "Create Spatial Index" option in my Spatial Definition Properties window. There is only "Spatial Index Name" option. When I'm trying to create spatial index manually, I can't, because "Spatial" option for creating index is inactive. I've checked "Register as Spatial Table" table option, but it also didn't help.
So, I have no way to create a spatial index. How can I do it?Hello usamytch,
creation of spatial index is confusing. We'll improve it in next releases. Here are the steps:
1) create index - no need to add columns
2) create spatial column definition ("Spatial properties" in table dialog)
3) In spatial column definition you can select your spatial column, coordinate system ID, dimensions and you can select one of existing indexes to be used as spatial one.
4) after that index appear as spatial and you can set spatial related properties in index dialog
5) you have to check "Register as Spatial Table" in order to get spatial meta-data generated in DDL
There are additional spatial properties you can set in physical model.
Philip -
Is it possible to create a spatial index on a view?
Hi
Is it possible to create a spatial index on a view?
We would like to link our spatial tables to each other (using only one of the SDO_GEOMETRY fields) in a view & make it very easy so that anybody can work with the data.
Thanks Caroline.Simon,
In order for autoregistration to work, you first need to make sure that all entries in mdsys.sdo_geom_metadata_table are registered with SDE. All tables not just one schema. None of our spatial tables or views exist in the SDE schema.
Also make sure all Oracle Spatial tables in sde.table_registry are held in mdsys.sdo_geom_metadata_table.
When a user makes a database connection in ArcCatalog, all Oracle Spatial tables will be registered with SDE automatically. Also, entries will be inserted into mdsys.sdo_geom_metadata_table and indexes will be created. If you do not have primary key fields, you will have to Register with Geodatabase and it will create the OBJECTID field.
This did not work for us originally. but after cleaning up metadata and installing SP1, it is working now and it is very convenient.
VIEWS:
You have to create the view thru SDE. You cannot register foreign views. There are bugs in support of views containing SDO_GEOMETRY objects. I have been told some problems will be fixed in SP2 and there may be a patch out to address some others.
Here are the incidents I have filed in reference to views:
1.
I created a view consisting of a geometry column from a "foreign" Oracle
Spatial table (SDO_GEOMETRY) and corresponding attribution in another table.
I used the following command to create the view through SDE:
C:\arcgis\arcexe81\BIN>sdetable -o create_view -T gis_v_traffic -t
"trims_traffi c_geom,traffic" -c
"trims_traffic_geom.geometry,trims_traffic_geom.fid,traffic.i
d_number,traffic.aadt" -w "trims_traffic_geom.mslink = traffic.mslink" -u
gis -p spatial -i esri_sde -s JJ0DN10
ArcSDE 8.1 Build 832 Thu Mar 22 14:08:07 PST 2001 Attribute Administration
Utility ----------------------------------------------------- Successfully
created view gis_v_traffic.
I can preview the geometries in ArcCatalog without error.
However, when I try to select a feature in ArcMap I get the following error:
The instruction at "0x125222dd" referenced memory at "0x00000000". The
memory could not be "read".
I click ok.
Then I get this error:
The insruction at "0x5f8012d3" referenced memory at "0x00000004". the memory
could not be "read".
I click ok and ArcMap terminates.
I can select features from the spatial table the view is pointing to, but
not from the view itself.
2.
I need to create views utilizing database links to tie attribution in other
databases to geometries created for that data in a spatial database.
I issued the following command from command prompt and got this error:
C:\arcgis\arcexe81\BIN>sdetable -o create_view -T link_v_traffic -t
"trims_traff ic_geom,[email protected]" -c
"trims_traffic_geom.geometry,trims_traffic_ge
om.fid,[email protected],[email protected]" -w
"trims_t raffic_geom.mslink = [email protected]" -u gis -p
spatial -i esri_sd e -s JJ0DN10
ArcSDE 8.1 Build 832 Thu Mar 22 14:08:07 PST 2001 Attribute Administration
Utility ----------------------------------------------------- Error:
Underlying DBMS error (-51). Error: Unable to create view link_v_traffic
ORA-00957: duplicate column name (link_v_traffic)
3.
Spatial Views created on Oracle Spatial LRS layers containing SDO_GEOMETRY
objects are not recognized as feature classes unless they are created with
the sdetable -o create_view command.
Here is typical SQL for the view creation:
create or replace view trims_v_traffic as select a.geometry,
b.nbr_tenn_cnty, b.nbr_rte, b.spcl_cse, b.cnty_seq, b.tr_beg_log_mle,
b.tr_end_log_mle, b.yr_trfc, b.aadt, b.pct_peak_hr, b.dhv_pct, b.drct_distr,
b.vhcl_pass_pickups, b.vhcl_su_trk, b.vhcl_mu_trk, b.actl_cnt, b.updt_by,
b.updt_on, b.mslink, b.mapid, b.id_number, b.sta_nbr from
gis.trims_traffic_geom a, gis.traffic b where a.mslink = b.mslink;
The table containing the SDO_GEOMETRY object is registered with SDE in the
following manner:
C:\arcgis\arcexe81\BIN>sdelayer -o register -l trims_traffic_geom,geometry
-e slM -k SDO_GEOME
TRY -s JJ0DN10 -i esri_sde -u gis -p spatial -c fid -C SDE
A feature class is successfully created for this layer and the data can be
added successfully to a map.
However, there is no way of adding data to a map from a spatial database
view containing an SDO_GEOMETRY object which was created externally from
SDE.
We are using Oracle Spatial 8.1.7 on NT 4.0. We are also using ArcGIS 8.1
and ArcSDE 8.1.1.
4.
SDE does not support spatial database views which reference snapshot
objects.
I was unable to create a view using sdetable -o create_view which referenced
a snapshot object.
The snapshot was created using the following sql syntax:
CREATE SNAPSHOT SNP_TEST
BUILD IMMEDIATE
REFRESH FAST
ON DEMAND
AS
SELECT * FROM [email protected]
We are using ArcSDE 8.1.1 with Oracle 8.1.7 on NT 4.0.
Here are the permissions I granted, they need to be the same for every schema:
for sde (these are all the permissions that might be needed for any type of
activity - new install or upgrade)..lets just step through and go ahead and
grant them all...
grant create session to sde;
grant create table to sde;
grant create procedure to sde;
grant create sequence to sde;
grant create trigger to sde;
grant unlimited tablespace to sde;
grant select any table to sde;
grant create any sequence to sde;
grant create any procedure to sde;
grant execute any procedure to sde;
grant drop any procedure to sde;
grant select any sequence to sde;
grant create any view to sde;
grant drop any view to sde;
grant create any trigger to sde;
grant drop any sequence to sde;
each Oracle user will also need the following privileges...
grant create session to gis;
grant create table to gis;
grant create procedure to gis;
grant create sequence to gis;
grant create trigger to gis;
grant unlimited tablespace to gis;
Viewer
The viewer is allowed to connect to an ArcSDE database. Other users grant
select privileges on their tables and feature classes to the viewer or to
the public role. The DBA can create a role that can be granted select
privileges on data objects owned by other users. The role can be granted to
the viewer.
create session
select on other user's data objects
Editor
The editor is allowed to connect to an ArcSDE database. Other users grant
select and insert, update, or delete on data objects they own to editor. The
DBA may create a role that can be granted select, insert, update, and delete
privileges on data objects owned by other users. The role can be granted to
the editor.
create session
select, insert, update, or delete on other user's data objects
Creator
The creator is allowed to connect to an ArcSDE database and create data
objects. The creator may grant privileges on their
objects to other users or roles. Other users can grant select and insert,
update, or delete on data objects they own to creator. The DBA may create a
role that can be granted select, insert, update, and delete privileges on
data objects
owned by other users. The role can be granted to the creator:
create session
create table
create procedure
create sequence
create trigger
unlimited tablespace
select, insert, update, or delete on other user's objects
It might be worthwhile to rebuild your SDE metadata. I can walk you thru that if you need help.
Hope this helps.
Dave
null -
Problems creating an spatial index with srid=4326
Hi!
I would like to know if somebody can help me with the following problem: We are using the 10.2.0.1 version and we need that our SRID value is 4326. We do not have problems with 8307 or another value. However, when we tried to use srid = 4326, appears the following error message:
Error on line 17 CREATE INDEX SIDX_D3M_SDO_GEOMETRY ON DAT_3DM_MODEL (DM3_SDO_GEOMETRY) INDEXTYPE ORA-29855: an error in the execution of routine ODCIINDEXCREATE has taken place ORA-13249: internal error in Spatial index: [mdidxrbd] ORA-13249: Error initializing geodetic transform ORA-06512: in “MDSYS.SDO_INDEX_METHOD_10I”, line 10
The PL/SQL that we used is the following one:
DELETE FROM USER_SDO_GEOM_METADATA WHERE TABLE_NAME = “DAT_3DM_MODEL”
COMMIT
INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID) VALUES('DAT_3DM_MODEL', 'DM3_SDO_GEOMETRY', MDSYS.SDO_DIM_ARRAY ( MDSYS.SDO_DIM_ELEMENT ('LONGITUDE', -180, 180, 0,05), -- MDSYS.SDO_DIM_ELEMENT ('LATITUDE', -90, 90, 0.05) ), 4326 )
CREATE INDEX SIDX_D3M_SDO_GEOMETRY ON DAT_3DM_MODEL (DM3_SDO_GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX
Thanks in advance,
Susana.I cannot reproduce the error, in my environment. However:
Your insert statement into USER_SDO_GEOM_METADATA appears to have included some typos. They might have happened, when transcribing. Please make sure you use the following:
INSERT INTO USER_SDO_GEOM_METADATA (
TABLE_NAME,
COLUMN_NAME,
DIMINFO,
SRID)
VALUES(
'DAT_3DM_MODEL',
'DM3_SDO_GEOMETRY',
MDSYS.SDO_DIM_ARRAY (
MDSYS.SDO_DIM_ELEMENT ('LONGITUDE', -180, 180, 10),
MDSYS.SDO_DIM_ELEMENT ('LATITUDE', -90, 90, 10)),
4326);
However, the actual culprit is most certainly different. As I suspected, it might be related to the "decimal comma": In Germany, for instance, a decimal comma is used, instead of a decimal point. You have used a decimal comma in your original INSERT, as well (0,05 instead of 0.05).
Please try the following:
SQL> select wktext from cs_srs where srid = 4326;
WKTEXT
GEOGCS [ "WGS 84", DATUM ["World Geodetic System 1984 (EPSG ID 6326)", SPHEROID
["WGS 84 (EPSG ID 7030)", 6378137, 298.257223563]], PRIMEM [ "Greenwich", 0.0000
00 ], UNIT ["Decimal Degree", 0.01745329251994328]]
On your system, you will likely find a decimal comma, where my output has a decimal point. This is bug 5097326, which has been fixed, and backported to 10.2.0.3 and 10.2.0.4. -
Ora-29879 on creating a spatial index
Database version 11.2.0.1
--STEP 1
DELETE FROM USER_SDO_GEOM_METADATA WHERE table_name='P_WALLACE_WORKPLAN';
commit;
--STEP 2
INSERT INTO USER_SDO_GEOM_METADATA
(table_name, column_name, diminfo,srid )
VALUES ('P_WALLACE_WORKPLAN','GEOMETRY',
MDSYS.SDO_DIM_ARRAY(
MDSYS.SDO_DIM_ELEMENT('X', -2.147E+09, 2147483647, .000005),
MDSYS.SDO_DIM_ELEMENT('Y', -2.147E+09, 2147483647, .000005)),4000000);
commit;
select * from user_sdo_geom_metadata WHERE table_name='P_WALLACE_WORKPLAN';
-- RECORD DOES EXIST
--STEP 3
drop index P_WALLACE_WORKPLAN_INDX_RTREE force;
-- DOESNT EXIST
--STEP 4
CREATE INDEX P_WALLACE_WORKPLAN_INDX_RTREE
ON P_WALLACE_WORKPLAN (GEOMETRY) INDEXTYPE IS
MDSYS.SPATIAL_INDEX PARAMETERS (' SDO_INDX_DIMS=3
LAYER_GTYPE="COLLECTION" SDO_RTR_PCTFREE=2 INITIAL=64K
NEXT=8192 MINEXTENTS=1 MAXEXTENTS=2147483645 PCTINCREASE=0');
--error ORA-29879 cannot create multiple domain indexes on a column list using same indextypeYour example works for me with little adjustments:
DROP TABLE P_WALLACE_WORKPLAN;
CREATE TABLE P_WALLACE_WORKPLAN(
id NUMBER,
GEOMETRY MDSYS.SDO_GEOMETRY);
DELETE FROM USER_SDO_GEOM_METADATA WHERE table_name='P_WALLACE_WORKPLAN';
COMMIT;
--STEP 2
-- SRID 4000000 does not exist ?!
-- changed to 2029
-- added third dimension
INSERT INTO USER_SDO_GEOM_METADATA
(table_name, column_name, diminfo,srid )
VALUES ('P_WALLACE_WORKPLAN','GEOMETRY',
MDSYS.SDO_DIM_ARRAY(
MDSYS.SDO_DIM_ELEMENT('X', -2.147E+09, 2147483647, .000005),
MDSYS.SDO_DIM_ELEMENT('Y', -2.147E+09, 2147483647, .000005),
MDSYS.SDO_DIM_ELEMENT('Z', 0, 10000, .000005)
),2029);
COMMIT;
SELECT table_name from user_sdo_geom_metadata
WHERE table_name='P_WALLACE_WORKPLAN';
-- RECORD DOES EXIST
--STEP 3
DROP INDEX p_wallace_workplan_indx_rtree FORCE;
-- DOESNT EXIST
--STEP 4
-- here the geometry is 3-dimensional
CREATE INDEX P_WALLACE_WORKPLAN_INDX_RTREE
ON P_WALLACE_WORKPLAN (GEOMETRY) INDEXTYPE IS
MDSYS.SPATIAL_INDEX PARAMETERS (' SDO_INDX_DIMS=3
LAYER_GTYPE="COLLECTION" SDO_RTR_PCTFREE=2 INITIAL=64K
NEXT=8192 MINEXTENTS=1 MAXEXTENTS=2147483645 PCTINCREASE=0'); -
Is there any plan of allowing non-range partitioning of spatial indexes
our application is really lacking the ability of spatial index being partitioned by list. We are binning information in our data warehouse by spatial locations, and when we query it (actually, MapViewer is generating a tile), entire geometry set is searched because table is list-partitioned and we cannot have local spatial index.
Hi,
I'm not in a position to answer the question about list partitioning, but would a pseudo-list partition implemented as a range partition work? For example, something like this:
CREATE TABLE customers (
first_name VARCHAR2(20),
last_name VARCHAR2(20),
address_1 VARCHAR2(20),
address_2 VARCHAR2(20),
city VARCHAR2(20),
state_abrv VARCHAR2(3),
postal_code VARCHAR2(10),
customer_id NUMBER NOT NULL UNIQUE)
PARTITION BY RANGE (state_abrv)
PARTITION ALASKA VALUES LESS THAN ('AKz'),
PARTITION ALABAMA VALUES LESS THAN ('ALz'),
PARTITION ARKANSAS VALUES LESS THAN ('ARz'),
PARTITION AMERICANSAMOA VALUES LESS THAN ('ASz'),
PARTITION ARIZONA VALUES LESS THAN ('AZz'),
PARTITION CALIFORNIA VALUES LESS THAN ('CAz'),
PARTITION WYOMING VALUES LESS THAN ('WYz')
);I've used this method in the past, although I agree a list partitioning solution is much preferred.
Dan -
ORA-01426 creating local partitioned intermedia index (URGENT)
We are trying to create a domain index on a daily partitioned table with Oracle 9.2.0.1. This table will have 365 partitions, one by day.
When creating the context index oracle dumps the next error:
ORA-29855: se ha producido un error en la ejecución de la rutina
ODCIINDEXCREATE
ORA-20000: Error de Oracle Text:
DRG-50857: oracle error in driddl.kglpurge
ORA-20000: Oracle Text error:
DRG-50857: oracle error in drdmlv
ORA-01426: desbordamiento numérico
ORA-30576: error al cargar el diccionario de la Opción ConText
DRG-50610: internal error: kglpurge []
ORA-06512: en "CTXSYS.DRUE", línea 157
ORA-06512: en "CTXSYS.TEXTINDEXMETHODS", línea 186
According to Thechnical overview Oracle Text 9.0.1 the limit on the number of partitions of a context index is of 9999; but it crashes when it gets to 255 (we can see this by the $ tables it has written).
¿is this a bug, is there any patch for this? ¿do we have to split the table?"UNIQUENESS" has to be across the table. However, when you create a LOCAL Index, the index segment is only within that table Partition. How can Oracle guarantee Uniqueness ? Only if the Index also includes the Table Partition Key -- that way it knows that no two rows in the two partitions will have the same value on the Partition Keys. The additional columns then allow for uniqueness without Oracle having to "verify" values in other Table Partitions.
That is why a LOCALlly Partitioned UNIQUE Index must include the Table Partition Key columns. -
Spatial Index on list partition?
Wondering if anyone has created a spatial index on a table that has a list partition. Documentation says only a range partition is supported.
Also, when creating the partition, has anyone created the partitions in parallel? i.e. hohup a gang of jobs that work on each partition.Hi Steven,
Oracle spatial partitioned indexing does not support list partitions.
Also, parallel spatial indexing is supported as of Oracle 9iR2, but the
parallelism implemented for partitioned indexing is partition-at-a-time
parallelism, i.e. partition 1 is indexed in parallel, then partition 2, etc.
Also implemented in 9iR2 is exchange partition, which allows you to
build the partitions for each index separately in parallel, then exchange
them in with very high index availability.
Hope this helps,
Dan -
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 -
Spatial index creation error -ORA-13011: value is out of range
I am trying to create a spatial index and this is what I get.
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13200: internal error [ROWID:AAAFXYAADAAABxyAAD] in spatial indexing.
ORA-13206: internal error [] while creating the spatial index
ORA-13011: value is out of range
ORA-00600: internal error code, arguments: [kope2upic014], [], [], [], [],
ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 7
ORA-06512: at line 1
I can't find any documentation as to how to fix this. How do you determine which row of data is out of range? Any help would be greatly appreciated!Hi Jeff,
The data at rowid AAAFXYAADAAABxyAAD has a problem.
Can see what the issue is by doing:
select sdo_geom.validate_geometry(geom_col_name,diminfo)
from your_table_name a, user_sdo_geom_metadata b
where b.table_name='YOUR_TABLE_NAME'
and a.rowid='AAAFXYAADAAABxyAAD';
If you are using Oracle9iR2 then this would be even better:
select sdo_geom.validate_geometry_with_context(geom_col_name,diminfo)
from your_table_name a, user_sdo_geom_metadata b
where b.table_name='YOUR_TABLE_NAME'
and a.rowid='AAAFXYAADAAABxyAAD'; -
Error when creating spatial index in 10g
Hello.
I have a problen when I try to create a spatial index. The strange thing is that the same commands always works fine in some machines, but if always fails in others. I tryed in diferent versiones of Oracle, but I have the error in al of them. The versions I have tryed are:
- 10.2.0.1
- 10.2.0.4
The operating systems are:
Windows XP professional 32 bits
Windows 2003 Server 32 bits
These are the steps i make:
1) Create a Table with a SDO_GEOMETRY column (GEOMETRY)
2) Load data with SQLLDR (I hve tryed different SRID's, and all fail)
So far everything is ok
3) Create the INDEX
When I execute the CREATE INDEX command CREATE INDEX MADRID_SX ON MADRID (GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
I obtain the error:
ERROR en linea 1:+
ORA-29855: se ha producido un error en la ejecucion de la rutina+
ODCIINDEXCREATE+
ORA-13282: fallo al inicializar la transformacion de coordenadas+
ORA-06512: en "MDSYS.SDO_INDEX_METHOD_10I", line 10+
I too have noticed that if I execute the next command, I have an error:
SELECT MDSYS.sdo_cs.transform(sdo_geometry(2001,8192,sdo_point_type(13.6,52.4,null),null,null),25830) from dual;
ERROR en linea 1:+
ORA-13282: fallo al inicializar la transformacion de coordenadas+
ORA-06512: en "MDSYS.SDO_CS", linea 75+
ORA-06512: en "MDSYS.SDO_CS", linea 112+
ORA-06512: en "MDSYS.SDO_CS", linea 2678+
And if I execute the next command, I too have another error:
SELECT SDO_CS.VALIDATE_WKT(25830) FROM DUAL;
FALSE (169)*
Any ideas? Could it be related with something inside the machines, user privileges, etc.?
Thanks in advance.I have found that the problem is to use a SRID of AUTH_NAME column in MDSYS.CS_SRS table without the value "Oracle." in it.
If I use an Oracle’s SRID, everything works fine. If I use an EPSG’s SRID, fails.
For example, this command uses an Oracle SRID (8192) and one from the EPSG (25830), and fails:
SELECT MDSYS.sdo_cs.transform(sdo_geometry(2001,8192,sdo_point_type(13.6,52.4,null),null,null),25830) from dual;
ERROR en linea 1:
ORA-13282: fallo al inicializar la transformacion de coordenadas
ORA-06512: en "MDSYS.SDO_CS", linea 79
ORA-06512: en "MDSYS.SDO_CS", linea 116
ORA-06512: en "MDSYS.SDO_CS", linea 2690
However, if I use two Oracle SRID (8192 and 83030), it works.
SELECT MDSYS.sdo_cs.transform(sdo_geometry(2001,8192,sdo_point_type(13.6,52.4,null),null,null),83030) from dual;
SDO_GEOMETRY(2001, 83030, SDO_POINT_TYPE(1625183.71, 5936269.06, NULL), NULL, NULL
Therefore, the problem seems to be to use a non Oracle SRID. -
Creating spatial indexes at the same time
Are there any locks on common DB objects when spatial index is created on one table?
We have application which creates a table with geometry column, fills this table and at the finish creates the spatial index. It seems, that this blocks other users to do this on other tables. The problem is also when the index on large table is created outside the application and this blocks the index creation for app users.
regards
SasoHi,
I believe you can create multiple spatial indexes concurrently. I'm not sure if there are special database parameters, but on my default Oracle9i release 2 install I can create multiple indexes at the same time.
Users cannot query the table using spatial operators until the index is built. Adding/deleting data may also be disabled while the index is building. Accessing data is allowed.
Can you describe the sequence of steps where the blocking occurs?
Maybe you are looking for
-
Blank page comes out when I try to make a copy on my HP 5610xi All In One Printer
Recently, I keep getting a Blank Page when I try to copy anything on my HP Officejet 5610xi All in One Printer. This question was solved. View Solution.
-
Postscript code printed instead of document
I've set up a printer on windows XP (it happens to be an HP laserjet 1100A, but I don't think that is the problem). I set it up for sharing and it prints perfectly. I connect from my ibook through wi-fi. When I add a printer it discovers the windows
-
Mac Mini (2012) as Wireless Gateway
I want to turn my mac mini into a wireless gateway. I have "pf" I need to know how to turn on wireless ap mode on? What command line tools are available? OpenBSD has "hostapd" for this. I plan to have my mini serve as my gateway router as well as me
-
I would like to have my business website (built using iWeb) hosted with another service other than .Mac. I have registered my domain name with GoDaddy and am looking at GoDaddy to host my website. I understand I need an FTP Client and GoDaddy directe
-
How To Store DataTime In MySQL
I would like to store a DateTime in MySQL. I am using the class PreparedStatement, and the method setDate(). But it just store the date, the time is 00:00:00 (ie. 2003-06-25 00:00:00) How can I store it? Thank you for help!