Recently we updated from ArcMap 10.1 to 10.2.2. ArcGIS Server is still on 10.1. We have numerous GP and Mapservices that were published on ArcMap 10.1 and are still running without problems. I also published a Map service from ArcMap 10.2, with data in an Enterprise GDB that is registered, without any problems. Now I have a python script that uses data from the same DB and works perfectly in ArcMap 10.2. I can publish it but when I run it, it returns false on the first
According to this link I should however be able to publish form 10.2.2 to 10.1 without too many problems.
Any ideas on what could be wrong? I guess it should be the data connection. But my Map service uses the same SDE, so my data should still be accessible.
In the original file, my workspace was defined as follows:
arcpy.env.workspace = "\\\\v057GIS\\Data\\Connection to v057gis.sde"
After publishing, this line changed suddenly to:
arcpy.env.workspace = arcpy.env.packageWorkspace
I can open the "C:\arcgisserver\directories\arcgissystem\arcgisinput\GPservice.GPServer\extracted\v101" file in python IDE, change the line and run it correctly. I'm however not able to save it. I read Modifying script published as Geoprocessing Service in ArcGIS for Server? about how to do it, but am a bit afraid of doing it since we only have production server.
Is there a workaround for that? Maybe directly in packageWorkspace?