Arcpy AttributeError: Object: Tool or environment <TruncateTable_management> not found

06-30-2016 12:46 AM
Occasional Contributor

Hi all,

I have a python script which runs perfectly on my PC running ArcGIS 10.3...

The script truncates a feature class in our ArcSDE, then appends new records.

As I flawlessly on my PC.

I now want to run this on our application server (windows 2012 R2) ArcGIS Desktop 10.2 and set up a schedule task...

When I run the exact same code on the server I get this error message:

  File "D:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\", line 14530, in TruncateTable

    raise e

AttributeError: Object: Tool or environment <TruncateTable_management> not found

Anyone have an idea?


0 Kudos
3 Replies
MVP Esteemed Contributor

The error message may be a bit misleading.  My initial thought is database connectivity.  What database are you running?  Do you have the right DBMS client files installed on the application server?  Can you connect to the SDE geodatabase using native DBMS client tools, like SQLCMD or SQLPLUS?

0 Kudos
MVP Esteemed Contributor

..and maybe version incompatibility.  If it is a 10.3.x database, may not be accessible in 10.2.x.

0 Kudos
New Contributor

Along the lines of the error message being misleading, I was getting this same error with a similar hardware setup as you, to find out the root cause was the C drive had been filled-up with temporary files from the job that was running.

0 Kudos