Oracle Spatial Index Advisor
Have tried to use subject and got an error when adding the table to analyze.
Error: Server object could not be created: server object could not be initialized: Non supported character set: oracle-character-set-171.
What's issue of this error? Does anyone know?
Hi Igor,
Not sure what the problem is.
This could be an NLS issue.
You might want to log a bug against
the Spatial Index Advisor with a small dump
file of your layer.
Also, can you make sure your entries
in USER_SDO_GEOM_METADATA are correct?
Thanks.
Dan
Similar Messages
-
Hi all,
Do you know why I got the following error when I try to use add a layer?
Server object could not be created: server object could not be initialized: Non supported character set:oracle-character-set-560
ThanksWell, I installed Oracle 8i and I used English as the default character set. The spatial index advisor is working now, but for sure I can display the data stored in the attributes because Arabic is the language we are using in our database with a character set (AR8MSWIN1256).
I do not know if there is another way we can run Spatial Index Advisor.
null -
Spatial Index Advisor : Error
I get a couple of error messages in Spatial Index Advisor when trying to draw indexed geometries. The errors are:
"Server object could not be created: server object could not be initialized: ORA-29902: error in executing ODCIIndexStart() routine", and then;
"Initialization error: server object could not be initialized: ORA-29902: error in executing ODCIIndexStart() routine"
Previously I uploaded a MapInfo table containing polygons using Easyloader, but without generating any indexes. Using DBA Studio, I created a spatial index with the assistance of the Tiling Wizard. I can only assume that the index itself was created OK, as I received no error messages from that process.
Am I missing somthing in my installation of Oracle? What is ODCI? I am using the 8.1.6 version downloaded from technet.
Thanks in advance,
Jon
nullThanks Dan,
I'll try your suggestion as soon as I can. First I just need to clarify a few other issues as well.
1. Does this mean that ODCI Indexing for Spatial is not necessarily incorrectly installed in my case? Put another way, is this just a problem with the Spatial Advisor, or does it go beyond that to the actual implementation of ODCI indexing in Spatial?
2. In one of my messages I alluded to the fact that I'd confirmed the problem using the Java API (meaning the 'SDOAPI'). In short, I formed an SQL statement requesting geometries for a specified window (SDO_FILTER), but got pretty much the same error relating to the 'ODCIIndexStart()' function. I'm not at home at the moment, so can't give you the details at this time. I think SQLPLus also reported the same error, leading me to conclude that it's a problem with the cartridge installation itself. Does the workaround that you suggested fix the problem for just the Spatial Advisor, or the SDO_FILTER operator in general? In essence, are you saying that ODCIIndexStart() (in Spatial) does not understand coordinate systems, or just the Spatial Advisor?
3. Is there a patch to fix this in the interim?
Sorry to be such a pain. It's just that I've been banging my head against the proverbial brick wall with this for a while. I was starting to think it was me not understanding something basic.
Regards,
Jon
null -
Question about "Spatial Index Advisor"
I'm now using "Oracle8i Enterprise Edition 8.1.6" and "Oracle8i Enterprise Manager 2.1" for Windows NT/2000. I tried to use the extended administration tool of the Manager "Spatial Index Advisor" to access my spatial data. I can see the layers in the "Add layer" Dialog. But when I want to add a layer, it popup a failed message box said "Server object could not be created:Server object could not be initialized:Not be supported charaterset:oracle-characterset-852". Why? And how can I solve the problem?
Hi Dinghy,
The Oracle 8.1.6 sdo advisor is only implemented for the US7ASCII character set.
The Oracle 8.1.7 release of the advisor does have NLS support.
Hope this helps. Thanks.
Dan
null -
ODCIIndexStart error in Spatial Index Advisor
Folks,
I am getting the following error when attempting to zoom in on a layer in the spatial index advisor:
Initialization error: server object could not be initialized
ORA-29902: error in executing ODCIIndexStart() routine
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "MDSYS.SDO_CS", line 236
I have seen similar sorts of complaints from a number of people in the forums but no clear explanation of what is causing the problem or how to resolve it.
I did a bunch of experiments and I have come to the conclusion that the problem only occurs with layers that have 3 dimensions and are geodetic. If I force a projected SRID to be used for the layer (and all component geometries) then the problem goes away. Or if I force the layer to be only 2D then it works fine.
I have also tried using "geodetic=false" and "sdo_indx_dims=2" when creating the spatial index, and these did not seem to help at all.
The problem is occuring for me in the spatial index advisor, but my understanding from my client is that it also occurs in other contexts, so I don't think this is specifically a spatial index advisor problem.
I would add that I believe I am running 9.2.0.1.0 on Windows XP.
I found I was able to reproduce the problem creating an indexing a layer as follows then opening it in the spatial index advisor and trying to zoom in:
-- Cleanup
drop index idx_test1 force;
drop table test1;
delete from user_sdo_geom_metadata where table_name = 'TEST1';
--Here's my table:
CREATE TABLE test1
PNT_ID NUMBER(17) NOT NULL,
ORA_GEOMETRY MDSYS.SDO_GEOMETRY
--Here's my insert:
INSERT INTO test1
VALUES ( 1, MDSYS.SDO_GEOMETRY(
3001, 8192, MDSYS.SDO_POINT_TYPE(60.8996766, -32.606364, 0), NULL, NULL
COMMIT;
-- of course I did the insert into the metadata table...
INSERT INTO USER_SDO_GEOM_METADATA
VALUES (
'TEST1',
'ora_geometry',
MDSYS.SDO_DIM_ARRAY(
MDSYS.SDO_DIM_ELEMENT('X', 50, 70, 0.0005),
MDSYS.SDO_DIM_ELEMENT('Y', -40, -30, 0.0005),
MDSYS.SDO_DIM_ELEMENT('Z', -10, 10, 0.0005)),
8192
COMMIT;
CREATE INDEX idx_test1
ON test1(ora_geometry)
INDEXTYPE IS MDSYS.SPATIAL_INDEX
I would appreciate any feedback on why this doesn't work and if there is a more elegant way of resolving the problem beside discarding my elevation values.This is reproducable in 9.2.0.4. I couldn't find a bug entered for it.
I entered bug 3149274.
There is a similar bug (2409529) that breaks projected layers. -
Hi Guru's
I am newby to Oracle spatial. Working as Database Admin.
I want information about spatial indexing like creation, maintenence ..etc.
It would be a great help if you can refer any relevant documents, articles or presentations.
Thanks in advance
Cheers
AntonyWelcome Antony
First place to start is the user documentation:
http://download.oracle.com/docs/html/B14255_01/toc.htm
start reading on the indexing here:
http://download.oracle.com/docs/html/B14255_01/sdo_intro.htm#sthref98
As an alternative/added value the Pro Oracle Spatial book is also a very good reference.
http://www.oracle.com/technology/products/spatial/htdocs/pro_oracle_spatial.html
there is also a second version for 11g.
For the maintenance, certainly from a DBA point of view, it is worthwhile looking at Radius Check. The lightweight free version offers an easy overview on the geometry tables, their metadata and their spatial indexes.
The professional version also gives Checks for invalid geometries with fixing capabilities.
On the Oracle Spatial Download page (http://www.oracle.com/technology/products/spatial/htdocs/spatial_partners_downloads.html), you can find the link second at the top to the webpage of Radius Check (http://www.1spatial.com/products/radius_check/index.php).
Good Luck
Luc
Edited by: lucvanlinden on Nov 14, 2008 8:45 AM -
Hi everyone,
how to tune spatial index in oracle? Pls advice
Thanks in AdvanceThat's a very open ended question. When posting questions on this forum you'll get better results if you have very specific questions. So do you have a specific spatial query which isn't performing well? If so then post as much information as you can about it.
- Exactly what version of Oracle database?
- What is the SQL query you're running - if possible include the explain plan
- What is your expected response time for the query?
- How much data is in the table and what kind of data is it
- Is possible provide some information about the use case behind the query you're running.
There are various techniques available to make spatial queries perform as you'd expect, but I'm not going to waste my time going through them here until you provide some useful information.
I'd recommend having a look at this presentation for some advice:
http://download.oracle.com/otndocs/products/spatial/pdf/ow_2009/spatial_oow09_tuning_and_best_practices2.pdf
Also have a look at this:
http://download.oracle.com/otndocs/products/spatial/pdf/spatial_wp09_bestprac.pdf -
Oracle Spatial 8.1.7 r-tree indexes
I don't think this problem is specific to r-tree indexes vs. quad-tree.
Even though I specify a tablespace other than the SYSTEM tablespace in Oracle Spatial Index Advisor when creating r-tree indexes, the index is still created in the SYSTEM tablespace. I don't want my spatial indexes in the SYSTEM tablespace!
select tablespace_name from user_indexes where index_name = 'GPS_IDX';
TABLESPACE_NAME
SYSTEM
Here is the sql statement that Spatial Index Advisor constructed:
create index gis.gps_idx on gis.gps (geometry) indextype is mdsys.spatial_index parameters ('sdo_indx_dims=2');
I was not able to issue this sql from worksheet with the tablespace option added. Is there a way to do that?
In Spatial Index Advisor, if I don't select the geometry column, then the sql is constructed with the tablespace option added, but when I select the geometry column, it removes it from the sql.
Can anybody shed some light on how to do this?
thanks
DaveSpatial creates an index entry in the system tablespace but realy creates the spatial index in the tablespace you gave it. To verify it execute the select:
select table_name,tablespace_name
from user_tables
where table_name like 'spatial_table%';
It will return your table_name plus the spatial index table created for it.
The table_name will look something like this:
spatial_table_SX_FL10$.
spatial_tables beeing your spatial table.
You can query the same for the indexes built on that previous table.
select index_name,tablespace_name
from user_indexes
where table_name = 'SPATIAL_TABLE_SX_FL10$';
The two index names would look like:
spatial_table_sx_fl10$B1
spatial_table_sx_fl10$B2
They should be created in the tablespace mentionned in your tablespace clause when creating the spatial index.
Hope this helps -
Using Java with Oracle Spatial
I am using the JDBC (Java classes dowloaded from
technet.oracle.com - (sdoapi.zip)) together with Oracle Spatial
8.1.6. I am writing a collection of Linestrings into Oracle
Spatial using the supplied java classes(sdoapi.zip). I use the
function createGeometryCollection(myCollection)to write the
Linestring collection to Oracle Spatial and they are written to
the database without error. However, when I try to read the
object back I get the following error:
Exception in thread "main"
oracle.sdoapi.geom.InvalidGeometryException
at oracle.sdoapi.adapter.AdapterSDO.importGeometry
(AdapterSDO.java:101)
at
MapInfoToOracleSpatial.MapInfoToOracleSpatial.main
(MapInfoToOracleSpatial.java:211)
I do not have a listing of this code so can you please tell me
what the error is (line of code) at line 211. Also, when I use
the Oracle Spatial Index Advisor to view the spatial data, it
only displays a quarter of the data. When I use MapInfo to view
it's equivalent TAB (Table) file it views correctly all the
data.
I can't understand why this is happening because the writing to
oracle and creation of each individual linestring does not
throw an error. It is only when I try to read back larger
objects from the database (2500 points) that it gives an error.
Is there a limitation on the size one can create linestrings?
Thanks
Regards
Stephen Syrett
Mobile Telecommunications Network
(MTN) South AfricaLatest Oracle Openworld Spatial/MapViewer activities list:
http://www.oracle.com/us/products/database/options/spatial/ssLINK/oow10-focuson-spatial-169204.pdf
thanks
LJ -
Function-based spatial indexes
hello,
I'm using a function-based spatial index, which I've set up in a way similar to Oracle's examples in the Spatial documentation. Here's the basic idea:
create table places (
place_id not null
primary key,
latitude number,
longitude number
-- This function is used to create an MDSYS.SDO_GEOMETRY object
-- as part of the Oracle Spatial indexing of the latitude and
-- longitude.
create or replace function get_long_lat_pt(
longitude in number,
latitude in number)
return MDSYS.SDO_GEOMETRY deterministic
is
begin
if latitude is null or longitude is null
then
return null;
else
return mdsys.sdo_geometry(2001, 8307,
mdsys.sdo_point_type(longitude, latitude, NULL), NULL, NULL);
end if;
end;
show errors
INSERT INTO USER_SDO_GEOM_METADATA
VALUES ('PLACES', 'schema_name.GET_LONG_LAT_PT(LONGITUDE,LATITUDE)',
MDSYS.SDO_DIM_ARRAY(
MDSYS.SDO_DIM_ELEMENT('Longitude', -180, 180, 0.00000005),
MDSYS.SDO_DIM_ELEMENT('Latitude', -90, 90, 0.00000005)),
8307
-- Create Oracle Spatial function-based index
CREATE INDEX places_long_lat_idx ON places(get_long_lat_pt(longitude, latitude))
INDEXTYPE IS mdsys.spatial_index PARAMETERS('layer_gtype="POINT"');
All of this works just fine. But then I try to do a nearest neighbor calculation:
select /*+ INDEX(places places_long_lat_idx) */ place_id
FROM places WHERE
SDO_NN(
get_long_lat_pt(longitude,latitude), -- table values
get_long_lat_pt(-71.1482, 42.3367), -- an arbitrary point
'sdo_num_res=2') = 'TRUE'
and I get this:
ERROR at line 1:
ORA-13249: SDO_NN cannot be evaluated without using index
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 17
ORA-06512: at "MDSYS.PRVT_IDX", line 27
It's as though Oracle isn't using the function-based index inside my SDO_NN call, even with a INDEX hint. I am stumped.
Just for kicks I tried to do a query using SDO_FILTER instead. I get:
ERROR at line 1:
ORA-13268: error obtaining dimension from USER_SDO_GEOM_METADATA
ORA-06512: at "MDSYS.MD", line 1723
ORA-06512: at "MDSYS.MDERR", line 8
ORA-06512: at "MDSYS.SDO_3GL", line 365
I am using Oracle 9.0.1.0.0, and I set QUERY_REWRITE_ENABLED=TRUE and QUERY_REWRITE_INTEGRITY=TRUSTED as noted in the Spatial documentation.
Any clues?
Thanks,
GregGreg,
The only times I have seen this error is when the
two parameters you mention are not set properly for the session.
I have a feeling that the parameters (QUERY_REWRITE_ENABLED,
and QUERY_REWRITE_INTEGRITY) are not getting the right values.
Can you verify this by doing a
show parameter QUERY_REWRITE_INTEGRITY
and
show parameter QUERY_REWRITE_ENABLED
from the session from where you are trying to execute
the Spatial operator.
Or you can try setting them for the session by
alter session set parameter=value
to see if it makes a difference.
thanks
siva -
We’re seeing the following issue: sql - Can Oracle be forced to use the spatial index for sdo_filter in combination with an or clause? - Stack Overflow (posted by a colleague of mine) and are curious to know if this behaviour is due to a difference between standard and enterprise, or could we doing something else wrong in our DB config.?
We have also reproduced the issue on the following stacks:
Oracle SE One 11.2.0.3 (with Spatial enabled)
Redhat Linux 2.6.32-358.6.2.el6.x86_64 #1 SMP Thu May 16 20:59:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
11.2.0.3.0 Standard Edition and 11.2.0.4.0 Standard Edition (both with Spatial enabled)
Microsoft Windows Server 2003R2 Standard x64 Edition
However, the SQL works fine if we try it on Oracle 11.2.0.3.0 *Enterprise* Edition.
Any help or advice would be much appreciated.
Kindest Regards,
KevinIn my experience sdo_filter ALWAYS uses the spatial index, so that's not the problem. Since you did not provide the explain plans, we can't say for sure but I think yhu is right: Standard Edition can't use the bitmap operations, and thus it'll take longer to combine the results of the two queries (because the optimizer will surely split this OR up in two parts, then combine them).
BTW: when asking questions about queries here, it would be nice if you posted the queries here as well, so that we do not have to check another website in order to see what you are doing. Plus it will probably get you more answers, because not everyone can be bothered to click on that link. It would also have been nice if you had posted your own answer on the other post here as well, because my recommendation would have been to use union all - but since you already found that out for yourself my recommendation would have been a little late. -
Oracle 10g EE - Spatial Index, C Interfacing & Custom C Functions
Hi everyone,
I'm doing a research project concerning indexing and I'd like to do some testing using Oracle DB.
My questions are:
1) I've noticed here (http://www.oracle.com/database/product_editions.html) that Spatial is not included in EE, is this just the complex spatial functions? Is the R-tree (or some other spatial index) still available for simple queries?
2) I've read that Pro*C is the simplest way to use Oracle from C, however Pro*C does not exist in 10g, only OCI. Is there a simpler way to use Oracle from C other than OCI?
3) How do I go about creating custom functions which are written in C (for speed reasons)?
If not all of these are possible in EE, which version of Oracle would I need?
Thanks heaps,
Martin.From the binaries point of view Spatial is included in the Enterprise Edition, the fact that it says it is an option means you have to buy a license additional from the enterprise Edition license to be able to use it.
You can find several demos based on MapViewer which are written in java, so IMO Pro*C is not the best suitable way to start working with Spatial Data, I suggest you to consider Java instead.
~ Madrid
http://hrivera99.blogspot.com/ -
Oracle 9 spatial index export/import
Hi,
when exporting/importing a user via exp/imp I encounter a problem with the numeric characters encoding during creation of a spatial index.
Imp tool produces script like this:
"BEGIN "
"execute immediate 'INSERT INTO USER_SDO_GEOM_METADATA values (''POINTS'',''GEOMETRY'',mdsys.SDO_dim_array(MDSYS.SDO_DIM_ELEMENT(''X'',50000000,160000000,,005),MDSYS.SDO_DIM_ELEMENT(''Y'',450000000,600000000,,005)),,005) ' ; "
"COMMIT; END;"
Problem is with wrong representation of the numeric value '0.005' as ,005.
Originally, the index was created via
INSERT INTO USER_SDO_GEOM_METADATA
VALUES (
'points',
'geometry',
MDSYS.SDO_DIM_ARRAY(
MDSYS.SDO_DIM_ELEMENT('X',-125000000,-115000000, '0.005'),
MDSYS.SDO_DIM_ELEMENT('Y', 30000000, 42100000, '0.005')
NULL
Any hints how to reimport the index correctly?
Thanks,
BogartYou might need to set the NLS_LANG environment variable to get character set conversion done on import (I don't know this unfortunately - it has never been a problem for me).
There is a section on character set conversions in the utilities manual. -
Oracle materialized view + spatial index
Hello,
i faced with problem when i create spatial index on materialized view.
I create materialized view on 2 table which contains spatial geometrys.
create materialized view mv_geom as
select g.nid, g.geometry
from geom1
union all
select select g.nid, g.geometry
from geom2
i created spatial index - all works fine, but when i try to drop table, i get exception "ORA-04020"...
Materialized view become invalid but don't drop from database.
SQL> drop materialized view mv_geom;
Materialized view dropped
But object does not drop
select * from all_objects z where z.OBJECT_NAME = 'geom1'
and z.OBJECT_TYPE ='MATERIALIZED VIEW'
Any ideas?
Thank's for help!I don't quite follow you. Do you mean that after you dropped mv "mv_geom".
you expect that the base table "geom1" should be dropped? -
Loading shapefiles into Oracle Spatial
Fellow Oracle Spatiallers!
Currently we edit Oracle Spatial data by checking data out into a shapefile,
making our changes off-line, and reloading the shapefile back into Oracle.
Instead of using the Oracle Spatial supplied tool, we decided to purchase
a utility called the "Spatial Loader" from a company called Geometry Pty Ltd
(http://www.geometryit.com). There are a number of reasons why we decided to
go that way which might become evident from the command line parameters of
this utility:
Usage: Shp2Spt [Arguments] [Options]
OR
Usage: Java com.geometryit.spatialloader.oracle.AdvancedJavaSpatialTranslator [Arguments] [Options]
[Arguments] must specify these values:
-o create
type of operation to perform
create creates a new table, must not exist already
recreate creates a new table, may exist already
init drops existing table, creates a new one
append appends data onto existing table
-f <shape_file>
the shape file or project to translate
-l <table,column>
target table and column for the geometry data
-D <database>
target database name
-u <username>
username for RDBMS
-p <password>
password for RDBMS
[Options] values are not necessarily required:
-s <server_name>
name of server with database
-port <port_number>
the port to connect to on the server
-ufi <column_name>
specify the name of the UFI field (unique ID)
-seq <sequence_name>
specify the sequence to use for the spatial data unique IDs
-a none
attributes mode
none no attributes will be transferred
all all attribtues will be transfered as found
file= file containing lines of the form:
<shape_attribute><space/tab><rdbms_column>
where
<shape_attribute> selects the column to be output
<rdbms_column> name of the column in RDBMS
-srid <id>
specify the Spatial Reference ID for the spatial data
(this must be set to use Spatial Reference Transformations)
-i [<level>] or -i rtree
create an index for the generated table
the <level> parameter is an optional integer
representing the depth of the quadtree created
if rtree is specified, the index created will be
an rtree
-c <commit_interval>
number of rows to commit after
-t <tolerance>
tolerance value for metadata
-r none
used to determine number of decimal places to round vertices to
if you use the tolerance-parameter option, specify the -t parameter before -r
-igc
ignore geometry collections
-sgc
split geometry collections
-sgd f
split geometry direction [forward | reverse]
-update-metadata <true/false>
update the Oracle Spatial Metadata table after loading data
-validate <true/false>
perform Oracle Spatial validation after loading data
-v
verbose mode on
-h or -?
display this help message
The main things I like about this tool are:
1. One step (no conversion to sqlloader form followed by a call to the sqlloader).
2. The ability to round the coordinates of the shapes in the shapefile by applying
the XY tolerance values held in the SDO_GEOM_METADATA table.
This is quite important because our editing package - due to double/single precision
issues - can actually move coordinates but those movements are sub the precision of
the actual data. By rounding to the nominate precision we can detect situations where
no actual change to the shape (and its attributes) was made and thus not create superfluous
revisions within the database.
3. It will correctly re-wind the coordinates of the outer/inner shells of polygons. This is
important as ESRI shapefiles are agnostic on the winding order: an outer shell coordinates
can be listed in either clockwise or anti-clockwise order.
4. You can specify the primary key (UFI) column (numeric) and an Oracle Sequence number such
that each new shape loaded can have its UFI assigned from that sequence.
Because of this flexibility, and the excellent support (it is a purchasable product) from the
developers, I can heartily recommend this loader to fellow Spatiallers. It is worth every
penny I spent on it. Try the free version on their website and if, like me, you like it,
purchase it!
regards
SimonHi Shuan,
As part of the zip file created for the next training course to be posted for Oracle Spatial on OTN (within the next few weeks) there is a free (unsupported, undocumented) version of a shape to sdo converter. This should work, but it is unsupported. It will create a layer that then needs to be migrated into 8.1.6 format.
If you need it quite soon send email to [email protected] and I can get it to you.
Hope this helps,
dan
Maybe you are looking for
-
How do I revert a drive from a Time Machine disk to a completely empty, unused disk?
Hello, I was performing my first Time Machine backup and my SATA controller failed on my Macbook Pro's motherboard, rendering internal drives inaccessible. The backup that was in-progress at the time had only completed a small percentage of the image
-
Lacie firewire 800 external hard drive not mounting in mac os 10.4.8
I have a pm g5 Dual 2ghz system ,i have connected an firewire 800 lacie 1tb external hard drive to the system,now the problem is it is not mounting on the desktop shows in the diskutility repaired the disk say's disk volume ok any way to mount the ex
-
FORCED DATA PACKAGE WITH PHONE UPGRADE
I have been a verizon customer since cell phones were cool. I started with a bag phone in my car. I have 5 verizon phones. Four on a family plan and one through a work plan. My son wanted to upgrade his phone today which is eligible for early
-
System settings does not allow changes to be made to object
Hi, In one of my test system, when i tried to change the object its displaying following error message. System settings does not allow changes to made to the object. I have checked the settings in se03, regarding modification objects of so
-
Hi! Is it possible to delete a group in Grapher? Because I can't find the option and there's nothing about it on the help file.