Error loading data giving a spatial reference error [ORA-02291: integrity constraint

2971
5
06-16-2010 09:05 AM
OvidioRivero
New Contributor III
Hello everyone,

I have some vector data on our test SDE database that I am trying to move to our production.  The data is in ST_GEOMETRY format and we are trying to copy it with the same format on the production server. If I use ArcCatalog (either copy and paste or import export) I get the error below.

ERROR 999999: Error executing function.

Underlying DBMS error[ORA-02291: integrity constraint (SDE.GEOM_SRID_FK1) violated - parent key not found]

DBMS table not found[ORA-00942: table or view does not exist

][COM_GIS.test_X][STATE_ID = 0]

Failed to execute (FeatureClassToFeatureClass).


We looked at the constraint being violated and it seems the layers we are trying to import  have an SRID not in the SDE.SPATIAL_REFERENCESS_TABLE.   When we compare the Spatial_references table on two test servers we have and production we find they are have all different number of records on that table (20 or more on the test servers) and production in particular(the server producing the error) has only 5 records on that table. 

The data loads fine on the older servers but not on the production server.

Has anyone seen this problem before?

Why is the SPATIAL_REFERENCES tables  different on all servers? 

Should it get updated when new layers are uploaded?

Thanks,
0 Kudos
5 Replies
JonDeRose
Esri Contributor
Q: Should sde.spatial_references update automatically if data with an unknown projection is added to the database?

A: Yes, new rows are inserted and a new ArcSDE SRID is generated within sde.spatial_references when a new layer requires a spatial reference that does not already exist in the table. ArcSDE predefined projection strings are maintained in ArcSDE's projection engine. They are inserted into SDE.SPATIAL_REFERENCES as needed.

The issue at hand here is not that the sde.spatial_references is not updating, but; the sde.st_spatial_references table is not.
0 Kudos
OvidioRivero
New Contributor III
John D,

Sorry I had not replied to your comment until now.  I' been working on other projects the last few months and did not follow up on this. We still have the problem. Only on one server and only with GCS_WGS84.  For any other coordinate system the ST_SPATIAL_REFERENCES table gets a new entry as expected but not for this one.
  
I had a tech support on this issue that I put on hold a few months ago I will reopen it.

Thanks
0 Kudos
DavidJennings
New Contributor II
I'm getting this exact same error.

If I try to load a Shapefile with GCS_WGS_1984 projection I get the error.

ERROR 999999: Error executing function.
Underlying DBMS error[ORA-02291: integrity constraint (SDE.GEOM_SRID_FK1) violated - parent key not found]
DBMS table not found[ORA-00942: table or view does not exist
][WS.test1234][STATE_ID = 7]
Failed to execute (FeatureClassToFeatureClass).


ArcGIS Desktop 9.3.1
ArcSDE 9.3  (Oracle10g Build 546)

Did you ever find out what was causing this error? 

David J.
0 Kudos
NiallCarter
New Contributor III
I have also just experienced this problem and have not found a solution.
My error is a slightly different flavour:
Failed to create feature class.
Underlying DBMS error[ORA-02291: integrity constraint (SDE.GEOM_SRID_FK1) violated - parent key not found]
The geometric network was not found


I do not have a geometric network in my feature dataset so I am intrigued as to where this comes from?

Regards,

Niall Carter
0 Kudos
anthonysanchez
New Contributor III
there are a few triggers in the sde schema responsible for maintaining this integrity.  Make sure you have all of them and that they are valid.

SQL> select table_name from dba_constraints where constraint_name='GEOM_SRID_FK1';

TABLE_NAME
------------------------------
ST_GEOMETRY_COLUMNS

SQL> select owner,name from dba_dependencies where referenced_name='ST_GEOMETRY_COLUMNS' and type='TRIGGER';

OWNER                          NAME
------------------------------ ------------------------------
SDE                            DB_EV_RENAME_ST_METADATA
SDE                            DB_EV_ALTER_ST_METADATA
SDE                            DB_EV_DROP_ST_METADATA
SDE                            TG_ST_GEOMINDEX_NAME
SDE                            TG_GCOL_NAME

SQL> select * from sde.version;

     MAJOR      MINOR     BUGFIX DESCRIPTION
     RELEASE SDESVR_REL_LOW
---------- ---------- ---------- -------------------------------------------------------------------------------
--------- ---------- --------------
         9          3          0  for Oracle10g Build 546 Thu Sep 18 12:35:50  2008
       93003          93001
0 Kudos