arcpy.Append_management to Oracle (using direct connect)

4499
5
Jump to solution
11-30-2012 08:00 AM
WillAllender
New Contributor III
Environment
ArcGIS 10.1 SP1, Python 2.7 (both using 32-bit, but running on a 64-bit PC)
Local file gdb
64-bit Oracle 11.2.0.3 on unix
Using Direct Connect

Arcpy command
arcpy.Append_management(r"C:\Batch\GISSTORE.gdb\Block",r"C:\Batch\SDEGISonGISD.sde\SDEGIS.Block","NO_TEST")

All features APPEND successfully, however I get the following message:
Runtime error  Traceback (most recent call last):   File "<string>", line 1, in <module>   File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 3560, in Append     raise e ExecuteError: ERROR 000372: Spatial Reference for output is invalid, Please update to allow output to become valid Failed to execute (Append).

I follow the link to ERROR 000372, chase rabbits down several holes, and then discover that I do not have a spatial index on the target feature class.  While attempting to CREATE a spatial index (using the interface within ArcCatalog), I get a generic 999999 DBMS error and cannot create the spatial index while logged in as either the data owner, or as SDE.  The help file states:
"The Spatial Grid 1, 2, and 3 parameters apply only to file geodatabase and certain ArcSDE geodatabase feature classes. "  Emphasis added to "certain".  The help files that I have uncovered so far do not elaborate.  But I'm sure it's buried somewhere down in the bowels...

Current plan
1. Start working with our DBAs to get a tracelog to resolve the DBMS error
2. Query the ArcGIS community on why all features load successfully, even the the original error message says that it failed.

Help with #2 requested.  Insight on #1 would also be appreciated.

Happy Friday!
Will
0 Kudos
1 Solution

Accepted Solutions
WillAllender
New Contributor III
Problem resolved.  I was misled by the error message:
"ERROR 000372: Spatial Reference for output is invalid, Please update to allow output to become valid Failed to execute (Append)"

The actual problem was that my tablespace quota was being exceeded during the process.  Once we upped the quota, Append finishes with no error.

View solution in original post

5 Replies
T__WayneWhitley
Frequent Contributor
If you have not done so already, you might take a look at the Oracle system table 10.1 webhelp ref:
http://resources.arcgis.com/en/help/main/10.1/index.html#//002n0000008m000000

Have you executed the CREATE INDEX command in Oracle as in the example on that page - don't know if that will solve your problem, but worth a try.

Here is the example:

CREATE INDEX shape_idx1 ON SCOTT.PARCELS (shape)
INDEXTYPE IS SDE.ST_SPATIAL_INDEX
PARAMETERS('st_grids=1,0,0 st_srid=1');
0 Kudos
WillAllender
New Contributor III
Wayne,

Thank you for the quick reply and link.

I should add to my initial post that we have not migrated to st_geometry.  Our production geodatabase grew out of coverage, then Arc 8.x, and is now in 9.3.1.  Geometry storage type is SDEBINARY.
0 Kudos
WillAllender
New Contributor III
As it turns out, my above posts have several incorrect statements/assumptions.

a) We have not tested shp2sde at 10.1, since we are using direct connect and have not installed SDE on the unix server.  shp2sde does work at 9.3.1, and that is as far as I can confirm.

b) It would appear that we are not using SDO geometry, but in fact, SDEBINARY geometry.  I am trying to confirm this but am struggling to find the definitive answer.

Any help would be appreciated.

Closing in on beer-thirty... 🙂
0 Kudos
WillAllender
New Contributor III
Problem resolved.  I was misled by the error message:
"ERROR 000372: Spatial Reference for output is invalid, Please update to allow output to become valid Failed to execute (Append)"

The actual problem was that my tablespace quota was being exceeded during the process.  Once we upped the quota, Append finishes with no error.
ThomasLaxson
New Contributor III

You've got to love ESRI's completely misleading error messages. After encountering the same problem as you, I'm just going to start ignoring the messages--I'll probably save a lot of wasted time.

0 Kudos