PROBLEM
Using the Oracle Data Pump Import utility, or the original import utility, one might encounter the Oracle error ORA-20091.
The following example demonstrates using Oracle's Data Pump import utility and the error message that is returned when the table being imported contains an ST_Geometry attribute and st_spatial_index index whose SRID value and spatial reference properties do not exactly match.
In the following example, the map user is importing the buildings table from the dumpfile buildings.dmp:
C:\>impdp map/map tables=buildings directory=exp_imp_dir dumpfile=buildings.dmp Import: Release 10.2.0.2.0 - Production on Tuesday, 22 January, 2008 16:38:00 Copyright (c) 2003, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production With the Partitioning, OLAP and Data Mining options Master table "MAP"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded Starting "MAP"."SYS_IMPORT_TABLE_01": map/******** tables=buildings directory=exp_imp_dir dumpfile=buildings.dmp Processing object type TABLE_EXPORT/TABLE/TABLE Processing object type TABLE_EXPORT/TABLE/TABLE_DATA . . imported "MAP"."BUILDINGS" 1.005 MB 3149 rows Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX Processing object type TABLE_EXPORT/TABLE/INDEX/TABLE Processing object type TABLE_EXPORT/TABLE/INDEX/TABLE_DATA . . imported "MAP"."S1_IDX$" 157.5 KB 4205 rows Processing object type TABLE_EXPORT/TABLE/INDEX/DOMAIN_INDEX/INDEX ORA-39083: Object type INDEX failed to create with error: ORA-20091: Import SRID does not match ST_Spatial_References SRID Failing sql is: BEGIN SDE.st_type_export.validate_spref(1,-1196.334263,-1028.576111,1000000,0,1,0,1,4267);COMMIT; END; Job "MAP"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at 16:38:04
The ORA-20091 error indicates that the building's SRID value and properties do not match any existing SRID values in the sde.st_spatial_references table for the database where the import is being performed.
The cause for the error is because the importing table's spatial reference metadata must exactly match an existing spatial reference in the database where the import is being performed.
The metadata for the spatial reference is stored in the sde.st_spatial_reference table. Each entry in the sde.st_spatial_reference table has a unique SRID value and additional attributes that define the properties of the spatial reference.
To ensure the validity of the spatial index being imported, the metadata from the export file must be compared to the spatial reference metadata in the database where the import is being performed.
If the spatial reference does not exist, the Oracle error "ORA-20091: Import SRID does not match ST_Spatial_References SRID" displays and prevents the spatial index from being created.
If this error is encountered during an import, the table containing the ST_Geometry attribute is still imported and the domain index table representing the st_spatial_index is still imported.
To create a spatial index on the table that was imported, the following steps must first be performed.
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA . . imported "MAP"."BUILDINGS" 1.005 MB 3149 rows Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX Processing object type TABLE_EXPORT/TABLE/INDEX/TABLE Processing object type TABLE_EXPORT/TABLE/INDEX/TABLE_DATA . . imported "MAP"."S1_IDX$"
SQL> DROP TABLE s1_idx$; Table dropped.
SQL> SELECT srid, sr_name FROM sde.st_spatial_references 2 WHERE sr_name = 'NAD_1983_StatePlane_Ohio_South_FIPS_3402_Feet'; SRID SR_NAME ---------- ----------------------------------------------- 65 NAD_1983_StatePlane_Ohio_South_FIPS_3402_Feet
SQL> UPDATE buildings t SET t.shape.srid = 65; 3149 rows updated. SQL> COMMIT;
SQL> CREATE INDEX buildings_shape_idx 2 ON buildings (shape) INDEXTYPE IS sde.st_spatial_index 3 PARAMETERS ('st_srid=65 st_grids=200'); Index created.
Article ID: 000009846
Get help from ArcGIS experts
Download the Esri Support App