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

3307
3
06-30-2016 12:46 AM
timdunlevie
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 said...works 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\management.py", line 14530, in TruncateTable

    raise e

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

Anyone have an idea?

Thanks

0 Kudos
3 Replies
JoshuaBixby
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
RebeccaStrauch__GISP
MVP Emeritus

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

0 Kudos
TrentHardy
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