Is it possible to add multiple script files containing other python classes, config etc, and even .sde connection files when publishing service definition from arcmap? I do not have access to the arcgis server directories.


Yes, it is. You would need to publish a GP service (either by publishing the result directly or by saving a sd first) and this way all the data that you don't have registered as your data sources in ArcGIS Server will be published. In certain situations, I had to publish myself like that and then all the scripts required to run the tool (just make sure you import them in your script tool file) and .sde connection file was copied over (the enterprise geodatabase was not registered).

  • What if im required to publish via arcgis server manager ? – Lars Anundskås Jun 5 '15 at 19:34
  • Should work fine - you should need to create an .sd file first anyway in ArcMap. Then just take this .sd and publish in Manager. – Alex Tereshenkov Jun 5 '15 at 19:36
  • 1
    In my tool, I referenced a second script which was in the same directory, I saw with winrar that this was included in the .sd. but I also referenced a .sde, initialized workspace and made sure the .sde was in the same dir. This one was not included in the .sd - when publishing directly it does complain that it wants to register the .sde though – Lars Anundskås Jun 5 '15 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.