Problem deleting table with editor tracking and creating new feature class

1199
8
Jump to solution
11-16-2017 09:30 AM
RebeccaHiller
New Contributor II

I had a table and wanted to replace it with a feature class. Therefore, I deleted to table and wanted to create a feature class. Later is not possible, issuing the following error: 

>>> arcpy.Delete_management(in_dataset)
<Result 'true'>
>>> arcpy.CreateFeatureclass_management  (sde, fc, 'POINT', has_z='ENABLED', spatial_reference='D:\devsbb\workspaces\didokbackend\DB\Scripts\SpacialReferences\CH1903+.prj')
Runtime error  Traceback (most recent call last):   File "<string>", line 1, in <module>   File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\management.py", line 1806, in CreateFeatureclass     raise e ExecuteError: ERROR 999999: Error executing function. An expected Field was not found or could not be retrieved properly. [ERSTELLT_VON] DBMS table not found [ORA-04043: object GSU_DIDOK.SUBSIDIARY_LOCATIONS does not exist] Failed to execute (CreateFeatureclass).  
>>> desc = arcpy.Describe(in_dataset)
>>> desc.editorTrackingEnabled
True

>>> in_dataset
'...GS_DIDOK_ENTW_GSU_DIDOK.sde\\GSU_DIDOK.SUBSIDIARY_LOCATIONS'
>>> sde
'...GS_DIDOK_ENTW_GSU_DIDOK.sde'
>>> fc
'GSU_DIDOK.SUBSIDIARY_LOCATIONS'‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

If I want to delete the table, I get the message that it does not exist. If I try to rename another feature class to the name of the new name, the system tells me that this feature class does already exists.

If I check the description for the corresponding feature class, I get the answer that editor tracking is enabled for this feature class. 
How can I get rid of this leftover?

0 Kudos
1 Solution

Accepted Solutions
RebeccaHiller
New Contributor II

Unfortunately, I'm not able to create a new fc with the same name. However, after manually deleting the leftovers in the sde tables as described in https://community.esri.com/thread/162578  solved the problem.

View solution in original post

8 Replies
RebeccaStrauch__GISP
MVP Emeritus

I see an error

"... Template Feature Class: Dataset D:\data\csv_export est.shp does not exist Or us not supported..."

in your first attempt to create the featureclass.  

My network is fine right now so can't test   ...but are you using the tool dialog, or just trying to type it in.   If you are using the tool, I would try those first, the copy the snippet from the results tab (if successful ) and try to modify that vide.  It may be you are missing/skipping an input parameter.

0 Kudos
RebeccaHiller
New Contributor II

You are true about this particular error. But it is the result of trying different options that didn't work either. I copied too much of the console output... and now edited it to omit confusion.

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

try testing to see if your in_dataset exists both before and after trying to delete (line one)

arcpy.Exists(in_dataset)

when you are listing the dataset in line 9, the output does not look correct.  if it was a ..\ at the beginning instead of ... it would bring you up a (folder) level from the current workstation environment (I believe) but ...AndSomeName  does not seem like a proper name.  However, based on the error, it looks like maybe you are dealing with Oracle??  And I use SQL and fgdb not Oracle, so can't be of much help.  However, just an fyi the ERROR 999999 is a default message when they have no additional info on the specific issues.  But grabbing that part of the error you got and makin it a little more legible might help.  Basically, it is not finding the table, so it can't find anything else it needs.  Make sense at all?

ERROR 999999: Error executing function. 
An expected Field was not found or could not be retrieved properly. 
[ERSTELLT_VON] DBMS table not found 
[ORA-04043: object GSU_DIDOK.SUBSIDIARY_LOCATIONS does not exist] 
Failed to execute (CreateFeatureclass)
RebeccaHiller
New Contributor II

Thank you for your reply. 
I truncated the path of the files as I didn't wanted to publish all that information. The paths are correct and the creation of a new feature class works perfectly, if I choose a different name for the feature class.

I tested and indeed, the dataset exists before, but also after deleting it. In the database, I do not find a corresponding table as I normally do.

>>> arcpy.Exists(in_dataset)
True
>>> arcpy.Delete_management(in_dataset)
<Result 'true'>
>>> arcpy.Exists(in_dataset)
True
>>> 

I assume, that there is a leftover somewhere in a metadata table or similar place that was not deleted on the first attempt to delete the data set. Does anyone has an idea where this information is stored and how I can delete the entry?

0 Kudos
RandyBurton
MVP Alum

Was editor tracking disabled before attempting to delete the table?

0 Kudos
RebeccaHiller
New Contributor II

No, I didn't, but it is too late now...

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

I'm not sure if this will work or not, but sometimes when things are partially deleted, for whatever reason (e.g. because of edit tracking) some times recreating the fc with the same name, then then trying again (maybe able to turn tracking off) will work.  Doesn't always, but might be worth a try.

0 Kudos
RebeccaHiller
New Contributor II

Unfortunately, I'm not able to create a new fc with the same name. However, after manually deleting the leftovers in the sde tables as described in https://community.esri.com/thread/162578  solved the problem.