Unable to drop spatial index
Hi
In my Oracle 11.2 Test database, i had accidentally deleted the base tables of a Spatial Domain index that starts with MDRT$.
I am unable to drop or rebuild the index. I even tried dropping the schema , however the query just hangs forever for both
SQL> drop index Geo1_ID_1 force;
SQL> drop user geonom cascade;I checked the AWR and ASH report , those sql are not listed there .
Please Suggest !
hi,
I'm grasping at straws here, but you might want to try recreating the user_sdo_geom_metadata entry. When you do, make sure there aren't any spaces in the table_name or column_name. It looks OK though from what you printed out.
Also, you might want to consider leaving off the sdo_numtiles and sdo_maxlevel. Oracle is no longer recommending the use of hybrid indexes in almost all cases.
regards,
dan
Similar Messages
-
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?
-
Spatial Index and XA transaction
Hi all,
I have problem with spatial index in XA transaction.
java.sql.SQLException: ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
ORA-29400: data cartridge error
ORA-14450: attempt to access a transactional temp table already in use
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 623
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 227
My configuration Java 5, Tomcat 5.5, UserTransaction manager Bitronix.
The problem disappears after dropping spatial index.
sql statement:
INSERT INTO ICING_SPATIAL.MAP_ISSUES ( FEATURE_ID, GEOMETRY, AUTHOR_ID, ISSUE_ID, ISSUE_STATUS, LANGUAGE, SOURCE, TEXT) VALUES ( ? ,SDO_MIGRATE.TO_CURRENT( ? , ( SELECT DIMINFO FROM ALL_SDO_GEOM_METADATA WHERE OWNER = ? AND TABLE_NAME = ? AND COLUMN_NAME = ? ) ), ? , ? , ? , ? , ? , ? )
Full stacktrace is:
java.sql.SQLException: ORA-29875: failed in the execution of the ODCIINDEXINSERT routine
ORA-29400: data cartridge error
ORA-14450: attempt to access a transactional temp table already in use
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 623
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 227
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:212)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:951)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1160)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:4245)
All user transactions are commited or rollbacked because the DBA_2PC_PENDING is empty: SQL> select * from SYS.DBA_2PC_PENDING;
no rows selected
SQL>
This problem occures regulary after any 2PC transaction has been rolledback. The next request causes this exception. Sometimes it appears after commit too, but I am able to reproduce it within ten or twenty requests.
Has anybody had simillar problem?
Thanks for any suggestions how to check what is going wrong.
Regards,
Zdenek VrablikThe problem is in Oracle Spatial.
Oracle database don't support Temporary tables and XA transactions together. Oracle Spatial uses temporary tables.
Possible solution (I am using)
One database connection(nonXA) to read data and one connection(XA) to insedt/update/delete data including spatial data. -
Hi
I was wondering
Does anyone know of the correct code to use to do the following:
1) Drop spatial indexes at the same time as droping a table
2) Renaming Spatial indexes
Any help would be greatly appreciated
Thanks in advanceSteve,
Does anyone know of the correct code to use to do the following:
1) Drop spatial indexes at the same time as droping a tableJust drop the table and the index will go automatically.
select asii.sdo_index_owner, index_name, table_name, column_name, asii.sdo_index_table
from all_sdo_index_info asii
inner join
all_sdo_index_metadata asim
on ( asim.sdo_index_owner = asii.sdo_index_owner
and
asim.sdo_index_name = asii.index_name
Where asii.table_owner = 'CODESYS'
and asii.table_name = 'GEOGRAPHIC_UNIT_POLYGON_SDO'
and asii.column_name = 'POLYGON';
-- Results
SDO_INDEX_OWNER INDEX_NAME TABLE_NAME COLUMN_NAME
CODESYS GGRPHC_NT_PLYGN_SD_PLYGN_SPX GEOGRAPHIC_UNIT_POLYGON_SDO POLYGON
drop table GEOGRAPHIC_UNIT_POLYGON_SDO;
-- Results
table GEOGRAPHIC_UNIT_POLYGON_SDO dropped.
purge recyclebin;
-- Results
purge recyclebin
select asii.sdo_index_owner, index_name, table_name, column_name, asii.sdo_index_table
from all_sdo_index_info asii
inner join
all_sdo_index_metadata asim
on ( asim.sdo_index_owner = asii.sdo_index_owner
and
asim.sdo_index_name = asii.index_name
Where asii.table_owner = 'CODESYS'
and asii.table_name = 'GEOGRAPHIC_UNIT_POLYGON_SDO'
and asii.column_name = 'POLYGON';
-- Results
no rows selected
2) Renaming Spatial indexes
-- ALTER INDEX [schema.]index RENAME TO <new_index_name>;
select asii.sdo_index_owner, index_name, table_name, column_name, asii.sdo_index_table
from all_sdo_index_info asii
inner join
all_sdo_index_metadata asim
on ( asim.sdo_index_owner = asii.sdo_index_owner
and
asim.sdo_index_name = asii.index_name
Where asii.table_owner = 'CODESYS'
and asii.table_name = 'PROJPOINT2D'
and asii.column_name = 'GEOM';
-- Results
SDO_INDEX_OWNER INDEX_NAME TABLE_NAME COLUMN_NAME SDO_INDEX_TABLE
CODESYS PROJPOINT2D_GEOM_SPIX PROJPOINT2D GEOM MDRT_20C2D$
ALTER INDEX codesys.PROJPOINT2D_GEOM_SPIX RENAME TO PROJPOINT2D_GEOM_SPX;
select asii.sdo_index_owner, index_name, table_name, column_name, asii.sdo_index_table
from all_sdo_index_info asii
inner join
all_sdo_index_metadata asim
on ( asim.sdo_index_owner = asii.sdo_index_owner
and
asim.sdo_index_name = asii.index_name
Where asii.table_owner = 'CODESYS'
and asii.table_name = 'PROJPOINT2D'
and asii.column_name = 'GEOM';
index CODESYS.PROJPOINT2D_GEOM_SPIX altered.
-- Results
index CODESYS.PROJPOINT2D_GEOM_SPIX altered.
select asii.sdo_index_owner, index_name, table_name, column_name, asii.sdo_index_table
from all_sdo_index_info asii
inner join
all_sdo_index_metadata asim
on ( asim.sdo_index_owner = asii.sdo_index_owner
and
asim.sdo_index_name = asii.index_name
Where asii.table_owner = 'CODESYS'
and asii.table_name = 'PROJPOINT2D'
and asii.column_name = 'GEOM';
-- Results
SDO_INDEX_OWNER INDEX_NAME TABLE_NAME COLUMN_NAME SDO_INDEX_TABLE
CODESYS PROJPOINT2D_GEOM_SPX PROJPOINT2D GEOM MDRT_20C2D$Notice how the rename is a rename: the SDO_INDEX_TABLE name does not change!
If this is correct or helpful, please award me with points.
regards
Simon -
Rebuilding Spatial index versus dropping&creating Spatial index.
System: Oracle Enterprise Edition 10g (10.1.0.4.0)
When I rebuilding a Spatial Index is the result the same when I am dropping the index and create a new Spatial Index?Final result of course will be the same. After rebuild or drop/create you will have the same index.
Some differences:
1. Rebuild uses existing index as the source for new index So, during rebuild process index will consume twise as much space.
2. Rebuild is faster than drop/create
3. Rebuild with online option guarantee that index will be still available for DML during rebuild
Andrejus -
Newly hardened Oracle11g database - unable to create Spatial or Text index
Oracle 11g Rel2, Windows 2003 platform
Our customer recently hardened their database and then tried to recreate their (previously working) schema. Now they're suddenly encountering these errors when trying to create a spatial index and text index respectively.
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 initializing geodetic transform
ORA-13249: SRID 8307 does not exist in MDSYS.CS_SRS table
ORA-29400: data cartridge error
ORA-04063: package body "MDSYS.SDO_CS" has errors
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
after running command
CREATE INDEX IDX_POINTGEOMETRY on PointGeometry(pointGeom) indextype is mdsys.spatial_index parameters('LAYER_GTYPE=POINT');
When I query mdsys.sdo_cs I can see that SRID 8307 does in fact exist.
AND
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-04063: package body "CTXSYS.DRIXMD" has errors
ORA-06508: PL/SQL: could not find program unit being called: "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: could not find program unit being called: "CTXSYS.DRIXMD"
after running command CREATE INDEX IDX_REPORT_XMLTYPE ON report(xmlreport)
INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS ('SYNC(ON COMMIT)');
Your help is greatly appreciated.I figured out the answer with help from the Oracle Spatial forum, but I wanted to follow up in case anyone was interested or would find this helpful.
As part of the hardening process, the system administrator (not a DBA), revoked execute privileges on DBMS_LOB (and a number of other packages) from PUBLIC. The problem was that he didn't read the fine print in the hardening manual that said that doing so "+may result in an inability to execute default Oracle applications and utilities. To correct this problem, grant execute privileges on these packages directly to the SYSMAN, WKSYS, MDSYSand SYSTEM accounts as well as any other default Oracle database and custom application object owner accounts as necessary to support execution of applications/utilities installed with an Oracle Database Server+". As a result, the MDSYS.SDO_CS and CTSXYS.DRIXMD package bodies had compilation errors from trying to access DBMS_LOB. To fix the problem I granted execute privileges on DBMS_LOB, etc to MDSYS and CTXSYS. I can now once again successfully create my Oracle Spatial and Oracle Text indexes. -
Unable to create function based spatial index
Maybe someone can help me. I can't seem to find the answer for what I'm doing here.
I'm trying to create a function based spatial index - so that I can utilize coordinates in tables when I have no SDO_GEOMETRY column.
Is there a fundamental problem with trying to do this or is it something syntactical?
Executing the following sql is giving me this error, while I'm trying to create the spatial index:
--create some table
CREATE TABLE "ZZ_ACTIVITIES"
( "DESCRIPTION" VARCHAR2(50 BYTE),
"CREW" VARCHAR2(50 BYTE),
"LATITUDE" NUMBER DEFAULT 0.0,
"LONGITUDE" NUMBER DEFAULT 0.0
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "MAP_NA_Q406" ;
--create the function that takes an srid, and x/y and returns an SDO_GEOMETRY
create or replace function get_geometry(p_srid in number,
p_x in number,
p_y in number)
return mdsys.sdo_geometry deterministic;
Is
Begin
Return MDSYS.SDO_GEOMETRY(2001,p_srid,mdsys.sdo_point_type(p_x,p_y,NULL),NULL,NULL);
End observation;
--insert sdo metadata
INSERT INTO USER_SDO_GEOM_METADATA(
TABLE_NAME,
COLUMN_NAME,
DIMINFO,
SRID
) VALUES (
'ZZ_ACTIVITIES',
'GET_GEOMETRY(8307,LATITUDE,LONGITUDE)',
MDSYS.SDO_DIM_ARRAY(
SDO_DIM_ELEMENT
'LONGITUDE',
-180,
180,
0.5
SDO_DIM_ELEMENT
'LATITUDE',
-90,
90,
0.5
8307
--create the index. (THIS IS WHERE THE ERROR IS THROWN)
CREATE INDEX zz_activities_location_sidx ON ZZ_ACTIVITIES(GET_GEOMETRY(8307,LATITUDE,LONGITUDE)) INDEXTYPE IS MDSYS.SPATIAL_INDEX parameters('layer_gtype=POINT');
The error returned is;
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 10Hi,
To follow up, the below code resolved the issue:
create index EQX_OKC_K_LINES_B_N4 on okc_k_lines_b(apps.eqx_oklb_term_date_nvl(date_terminated))
logging
tablespace eqixdata
noparallel;
-- qualifying the custom function name with schema name resolved the issue.
Thanks,
Rahul -
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 -
friends,
i m unable to create an index on table named counties having SDO_GEOMETRY column named geom.
when i execute the create index command it gives me this error
SQL> create index county_ind on counties(geom)
2 INDEXTYPE IS MDSYS.SPATIAL_INDEX
3 PARAMETERS('SDO_LEVEL = 16, SDO_NUMTILES=32');
create index county_ind on counties(geom)
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-13200: internal error [ROWID:AAAG13AABAAAkfXAAD] in spatial indexing.
ORA-13197: element MDSYS.COUNTIES.. is out of range
ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 7
ORA-06512: at line 1
please help me to solve this problem
Harpreet
nulltry this
create index idx_cities on cities(location)
indextype is mdsys.spatial_index
parameters('sdo_level=9');
the same procedure for counties,interstates
and states.first drop the index and then
recreate it.still if it doesnt work check
somepackageboby,package ie like triggers are
anyone of these invalid make this to be valid
and try again
srikanth.v
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Shalu:
I tried it all I still keep getting this error
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCI
ORA-13203: failed to read SDO_GEOM_METADATA table
ORA-29400: data cartridge error
ORA-00904: invalid column name
ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 7
ORA-06512: at line 1
Shalu<HR></BLOCKQUOTE>
null -
Spatial index - invalid geometry
Hello,
I have a table with buildings, on that a spatial index and everything was working fine.
Then, I added some more data (buildings) and the spatial queries (e.g., sdo_within_distance) didn't work anymore. I then dropped the spatial index and recreated it. That seemed to work fine (sqlplus told me "Index created"). When I go into the enterprise manager and check the spatial index it says this:
Failed to initialize Related Segments Space Info: ORA-00600: internal error code, arguments: [ktsircinfo_num1], [0], [0], [0], [], [], [], [] ORA-06512: at "SYS.DBMS_SPACE", line 429 ORA-06512: at line 1
Anyone knows what this might have to do with?
I also checked the geometries using VALIDATE_GEOMETRY_WITH_CONTEXT and found that there are some geometries with redundant points and self-intersecting boundaries.
Could this explain the above problem?
MarkusHi, thanks, I decided to try an example word for word but I am still having the same problems.
I am thinking this might be an OEM error but I don't know. If it is I can live with it, but I need to know what the problem is before I can ignore an error in my production system.
This is what I am doing:
Following the directions provided in the following doc:
Doc ID: Note:146094.1
Subject: 9i New Feature: SDO_GEOMETRY Objects in Function-Based Indexes
Type: BULLETIN
Status: PUBLISHED
Content Type: TEXT/PLAIN
Creation Date: 17-MAY-2001
Last Revision Date: 21-APR-2004
PURPOSE ------- This article shows how to create and use a function-based index where the function returns an SDO_GEOMETRY object.
After I create the first index (LONG_LAT_TABLE_IDX) and then use OEM to find indexes for scott schema and click on LONG_LAT_TABLE_IDX entry I get the same exact error.
I am using 10g.
Are there "patches" for 10g that I need? If so, how do I figure out what I need?
Thank you for your time.
Les. -
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'??? -
Hi, everyone
I created a spatial index on a table, but i get the error message:
ORA-13033: the data in sdo_elem_info_array of sdo_geometry is unavailable
How can i write a SQL command to delete those unavailable records?Hi,
here you find an example with a similar error. You simply can validate the spatial data, to find 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 button in the new design ?!
In the meantime found the Syntax Highlighting (->Switch to the advanced editor, paste your code, mark it, click the >> (insert) button, select Syntax Highlighting, choose the style...> -
How to optimize massive insert on a table with spatial index ?
Hello,
I need to implement a load process for saving up to 20 000 points per minutes in Oracle 10G R2.
These points represents car locations tracked by GPS and I need to store at least all position from the past 12 hours.
My problem is that the spatial index is very costly during insert (For the moment I do only insertion).
My several tries for the insertion by :
- Java and PreparedStatement.executeBatch
- Java and generation a SQLLoader file
- Java and insertion on view with a trigger "instead of"
give me the same results... (not so good)
For the moment, I work on : DROP INDEX, INSERT, CREATE INDEX phases.
But is there a way to only DISABLE INDEX and REBUILD INDEX only for inserted rows ?
I used the APPEND option for insertion :
INSERT /*+ APPEND */ INTO MY_TABLE (ID, LOCATION) VALUES (?, MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(?, ?, NULL), NULL, NULL))
My spatial index is created with the following options :
'sdo_indx_dims=2,layer_gtype=point'
Is there a way to optimize these heavy load ???
What about the PARALLEL option and how does it work ? (Not so clear for me regarding the documentation... I am not a DBA)
Thanks in advancedIt is possible to insert + commit 20000 points in 16 seconds.
select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
drop table testpoints;
create table testpoints
( point mdsys.sdo_geometry);
delete user_sdo_geom_metadata
where table_name = 'TESTPOINTS'
and column_name = 'POINT';
insert into user_sdo_geom_metadata values
('TESTPOINTS'
,'POINT'
,sdo_dim_array(sdo_dim_element('X',0,1000,0.01),sdo_dim_element('Y',0,1000,0.01))
,null)
create index testpoints_i on testpoints (point)
indextype is mdsys.spatial_index parameters ('sdo_indx_dims=2,layer_gtype=point');
insert /*+ append */ into testpoints
select (sdo_geometry(2001,null,sdo_point_type(1+ rownum / 20, 1 + rownum / 50, null),null,null))
from all_objects where rownum < 20001;
Duration: 00:00:10.68 seconds
commit;
Duration: 00:00:04.96 seconds
select count(*) from testpoints;
COUNT(*)
20000 The insert of 20 000 rows takes 11 seconds, the commit takes 5 seconds.
In this example there is no data traffic between the Oracle database and a client but you have 60 -16 = 44 seconds to upload your points into a temporary table. After uploading in a temporary table you can do:
insert /*+ append */ into testpoints
select (sdo_geometry(2001,null,sdo_point_type(x,y, null),null,null))
from temp_table;
commit;Your insert ..... values is slow, do some bulk processing.
I think it can be done, my XP computer that runs my database isn't state of the art. -
Spatial index - mapviewer demo
Hi,
I tried the mapclient.jsp demo of the maviewer demo and it only returns a blue image. I check the log file and found this:
[oracle.sdovis.JDBCDataSource4PT, Thu May 18 10:21:36 CST 2006, ERROR] *** SQL Exception while querying theme: THEME_DEMO_COUNTIES
[oracle.sdovis.JDBCDataSource4PT, Thu May 18 10:21:36 CST 2006, ERROR] java.sql.SQLException: ORA-13226: interface not supported without a spatial index
seems like a spatial index is missing. My question is,
- is the spatial index created when I imported the mvdemo.dmp file?
- is this the same index that is stated in the oracle_home\mapviewer\lbs\admin\mapdefinition.sql?
- or, is this index should be included in the database installation?
- who should be creating this index?
- if I create this index, how would I do this?
I really need your assistance. I'll be presenting this demo to my boss two days from now, my team is pushing the idea of migrating our existing gis system to Oracle Spatial. We need this demo badly.
Thanks for the support?First, which MapViewer version are you using and which database version?
Second, the indexes are usually built on import. You can check if they exist and if not create them.
To check if the indexes exist
select * from user_sdo_index_info
An sample index creation statement is:
create index counties_sides on counties(geometry) indextype is mdsys.spatial_index;
If the index exists and is invalid then drop it and recreate it. Drop it using
drop index counties_sidx force ; -
Problems building a spatial index - this must be a bug please help!
Hi,
We have a rather large spatial data warehouse. The schema is a star schema and is partitioned. During a load recently we had an error with one particular dataset, when building the index we got:
ERROR at line 1:
ORA-29855: error occured in the execution of ODCIINDEXCREATE routine
ORA-06512: at "MDSYS.SDO_INDEX_METHOD_10I", line 10
We have seen this kind of thing before, but usually dropping the data and reloading works fine (or rebuild the index). I should not that this obviously occurs before the partition is exchanged in. We are running 10.2.0.2 on red hat ES3.
With this error we tried to reload the data, but get the same. We tried the data on another copy of the system, and the same. We have tried the data on a 10.2.0.3 and an 11.1.0.6 database and all fail at the same location. We have validated the geometries - all fine, I have tried changing the DIMINFO so that it spans the whole globe, it failes again (by the way we are on SRID 8307 and all data is point type). The data is approx 1.2M rows and I have tried subdividing it up into smaller tables and these all build fine. I have partitions with much higher row counts and these are fine. I have tried everything possible including changing index parameters e.g. parallel tablespace etc. I have tried it on a tablespace without ASSM and one with and both fail. I have an export of the data if anyone would be available to try it?
I would really appreciate any help at all on this one.
Thanks
JonathanThere was a post a few months ago that addressed issues with 10.2.0.3 and Spatial index creation: Re: Fixed ...
-Justin
Maybe you are looking for
-
Weblogic 10.3.2 - Visitor entitlements role issue
1)I am upgrading my weblogic portal application from Weblogic 8.1SP4 to Weblogic 10.3.2 version. I found that roles that created under visitor entitlements thru weblogic portal administration portal are not visible to assigned user.For example I crea
-
Mid-2013 Macbook Air: question about the battery life
First of all, I'm sorry if these questions have been already asked, I've looked around and I've seen some answers, but none that fit my specific case. I have had this computer since December (Macbook Air, 13'', Mid-2013), I've been using it for a mon
-
Does time machine wear out drives?
granted that all mechanical devices wear out, but does use of Time Machine with its hourly/daily/weekly backups cause more wear on a drive? the hourly backups will move more data depending on the work one is doing. The constant backing up is great fo
-
How do you tell if your iphone has been hacked?
How do you tell if you iphone has been hacked? I have an iphone 3GS and I've gotten text messages from 2 different people that i don't know, telling me they can't see the pics that I've sent them & wanting to know what the pics are of. One of the num
-
Can I download App Store purchases as an installer?
I have limited and slow internet at home but access to much faster unlimited internet at work. Downloading 1GB+ sized apps will just take forever at home, not to mention putting a big dent in my monthly download limit. Unfortunately I cannot take m