Need help with arcpy with ARCSDE with Oracle

354
1
12-22-2010 04:20 AM
by Anonymous User
Not applicable
I have written a script that imports cad drawings into a geodatabase.  I first was importing into a file gdb and have since modified it to use SDE with Oracle as a db.  Troubleshooting has a been a nightmare.  The overall error is:

ERROR 999999: Error executing function.
Underlying DBMS error [ORA-00911: invalid character
(SDE.VU_0029_04_dwg_Point)] [SDE.VU_0029_04_dwg_Point]
Failed to execute (Merge).

But, after testing the tablename throughly I came to the conclusion the problem lies within the column names. So, I added code to check those and this is the result:

Fieldname EntLinetype changed to EntLinetyp
Fieldname BlkLinetype changed to BlkLinetyp
Fieldname APPLICATION changed to APPLICATIO
Fieldname FILE_VERSION changed to FILE_VERSI
Fieldname INTERNAL_UNITS changed to INTERNAL_U
Fieldname FACILITY_ID changed to FACILITY_I
Fieldname LEGEND_POINT_X changed to LEGEND_POI
Fieldname LEGEND_POINT_Y changed to LEGEND_POI

Now my real question is why is arcpy truncating my column names to 10 characters when my db supports 30 characters?   Is there a way I can get around this?
Tags (2)
0 Kudos
1 Reply
by Anonymous User
Not applicable
After much investigation, I find that arcpy.ValidateTableName() returns a truncated name but isn't used.  It still uses my long field name.  The real problem I was running into is a encoding problem. Not sure where this column name is coming from but fixed with

if field.name.encode('ascii', 'ignore').upper() == "Y":
   fieldMappings.removeFieldMap(fmCnt)


0 Kudos