<?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 ListDatasets problem with Geoprocessing Service in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/listdatasets-problem-with-geoprocessing-service/m-p/262222#M20147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I create a Python Script as Show below to print the list of Datasets in arcpy.AddMessage() this script run successfully for (*.gdb, *.sde) but when publish this script as Geoprocessing Service it work successfully for (*.gdb) only and return empty list for (*.sde).&lt;/P&gt;&lt;P&gt;Note: The two workspaces I used as “E:\WSTest.gdb” and “E:\WSTest.sde” where SDE is for SQL Server Express 2008R2&lt;/P&gt;&lt;P&gt;WS_in is string for the path of Workspace&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

import arcpy


WS_in = arcpy.GetParameterAsText(0)


arcpy.env.workspace = WS_in
arcpy.AddMessage(arcpy.env.workspace)


lst = arcpy.ListDatasets()
arcpy.AddMessage(lst)
for i in lst:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(i)

&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;



&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;



&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 12:51:22 GMT</pubDate>
    <dc:creator>Mohamed_MagdyMohamed_Hussain</dc:creator>
    <dc:date>2021-12-11T12:51:22Z</dc:date>
    <item>
      <title>ListDatasets problem with Geoprocessing Service</title>
      <link>https://community.esri.com/t5/python-questions/listdatasets-problem-with-geoprocessing-service/m-p/262222#M20147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I create a Python Script as Show below to print the list of Datasets in arcpy.AddMessage() this script run successfully for (*.gdb, *.sde) but when publish this script as Geoprocessing Service it work successfully for (*.gdb) only and return empty list for (*.sde).&lt;/P&gt;&lt;P&gt;Note: The two workspaces I used as “E:\WSTest.gdb” and “E:\WSTest.sde” where SDE is for SQL Server Express 2008R2&lt;/P&gt;&lt;P&gt;WS_in is string for the path of Workspace&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

import arcpy


WS_in = arcpy.GetParameterAsText(0)


arcpy.env.workspace = WS_in
arcpy.AddMessage(arcpy.env.workspace)


lst = arcpy.ListDatasets()
arcpy.AddMessage(lst)
for i in lst:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(i)

&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;



&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;



&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:51:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listdatasets-problem-with-geoprocessing-service/m-p/262222#M20147</guid>
      <dc:creator>Mohamed_MagdyMohamed_Hussain</dc:creator>
      <dc:date>2021-12-11T12:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: ListDatasets problem with Geoprocessing Service</title>
      <link>https://community.esri.com/t5/python-questions/listdatasets-problem-with-geoprocessing-service/m-p/262223#M20148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you might need to register the database connection on the server.&lt;/P&gt;&lt;P&gt;Here's a link in case you are unfamiliar with this setup.&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/#/Registering_your_data_with_ArcGIS_Server_using_Manager/01540000056s000000/" title="http://resources.arcgis.com/en/help/main/10.2/#/Registering_your_data_with_ArcGIS_Server_using_Manager/01540000056s000000/"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 13:51:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listdatasets-problem-with-geoprocessing-service/m-p/262223#M20148</guid>
      <dc:creator>DallasShearer</dc:creator>
      <dc:date>2014-11-03T13:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: ListDatasets problem with Geoprocessing Service</title>
      <link>https://community.esri.com/t5/python-questions/listdatasets-problem-with-geoprocessing-service/m-p/262224#M20149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you it work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Nov 2014 13:33:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/listdatasets-problem-with-geoprocessing-service/m-p/262224#M20149</guid>
      <dc:creator>Mohamed_MagdyMohamed_Hussain</dc:creator>
      <dc:date>2014-11-06T13:33:58Z</dc:date>
    </item>
  </channel>
</rss>

