<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Published GP service is not using data store in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/published-gp-service-is-not-using-data-store/m-p/139221#M5431</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a known issue with server 10.2.1 - NIM098733. It's fixed at 10.3 and I don't think there are any plans to backport to 10.2, so I'll have to upgrade, or keep editing the script after publishing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Nov 2015 15:39:16 GMT</pubDate>
    <dc:creator>JonMorris2</dc:creator>
    <dc:date>2015-11-20T15:39:16Z</dc:date>
    <item>
      <title>Published GP service is not using data store</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/published-gp-service-is-not-using-data-store/m-p/139220#M5430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I published a GP tool to my server and it fails when I try and run it via Javascript API. The error is that it cannot find the input dataset - this is happening because the input workspace is a file GDB on a network share and the server does not have access to any network resources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We've set up the data store (see screenshot) so that the network file GDB is duplicated locally, and I thought that the GP service would use the local workspace instead, but this clearly isn't happening.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="DataStore.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/130062_DataStore.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I remote desktopped onto the server and found the location of the python script and saw that the workspace had been converted to a global variable, but was still pointing to the network GDB. Should this have been changed to the local GDB?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;# Esri start of added variables
g_ESRI_variable_1 = u'\\\\getech\\store\\UTILITIES\\Globe_Data\\2015_08_04\\globe20150804-134955.gdb'
# Esri end of added variables


...


INWorkspace = g_ESRI_variable_1
OUTWorkspace = arcpy.env.scratchGDB
arcpy.env.workspace = INWorkspace
arcpy.env.scratchWorkspace = OUTWorkspace


etc&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I edit the script and change&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;g_ESRI_variable_1 = u'\\\\getech\\store\\UTILITIES\\Globe_Data\\2015_08_04\\globe20150804-134955.gdb'&lt;/PRE&gt;&lt;P&gt;to&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;g_ESRI_variable_1 = r'd:\data'&lt;/PRE&gt;&lt;P&gt;it runs ok when called with Javascript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cc &lt;A href="https://community.esri.com/space/2087" target="_blank"&gt;Geoprocessing&lt;/A&gt;​ &lt;A href="https://community.esri.com/space/2128" target="_blank"&gt;ArcGIS API for JavaScript&lt;/A&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:42:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/published-gp-service-is-not-using-data-store/m-p/139220#M5430</guid>
      <dc:creator>JonMorris2</dc:creator>
      <dc:date>2021-12-11T07:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: Published GP service is not using data store</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/published-gp-service-is-not-using-data-store/m-p/139221#M5431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a known issue with server 10.2.1 - NIM098733. It's fixed at 10.3 and I don't think there are any plans to backport to 10.2, so I'll have to upgrade, or keep editing the script after publishing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2015 15:39:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/published-gp-service-is-not-using-data-store/m-p/139221#M5431</guid>
      <dc:creator>JonMorris2</dc:creator>
      <dc:date>2015-11-20T15:39:16Z</dc:date>
    </item>
  </channel>
</rss>

