Working with Oracle spatial tables from within the Esri ArcGIS products

Liz Sanderson
Liz Sanderson
  • Updated

In order for the ArcGIS Interoperability extension to successfully display an Oracle Spatial table, the table must have a spatial index. You may need to contact your Oracle database administrator to have the spatial index added. The following example Oracle SQL command will create a spatial index for a table (for the geometry column named 'geom'):

 CREATE INDEX my_index ON my_table(geom) INDEXTYPE IS MDSYS.SPATIAL_INDEX; 


In order for the ArcGIS Interoperability extension to successfully identify individual features (and show them in a table view), the table must have an integer index. Ensure that the database table has an indexed column with the following properties:

  • The indexed column must be an integer type (with unsigned 32 bit values).
  • The indexed column must require unique values.
  • The indexed column must not allow null values.

If you already have a column in the table with unique integer values, then you can use the following example Oracle SQL commands to make the column indexed and not null:

 ALTER TABLE my_table ADD UNIQUE (my_old_id); ALTER TABLE my_table MODIFY (my_old_id NOT NULL); 

If you do not have a unique integer column in the table, then you need to create a new column and set the values with unique integers. The following example Oracle SQL commands will create a new indexed column:

 ALTER TABLE my_table ADD my_new_id INTEGER UNIQUE; UPDATE my_table SET my_new_id = ROWNUM; ALTER TABLE my_table MODIFY (my_new_id NOT NULL);

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.