<?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 Geodatabase not getting updated - No errors returned in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/geodatabase-not-getting-updated-no-errors-returned/m-p/499089#M16605</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've got a geoprocessing service based on a python script. The script works great from ArcGIS Desktop but when run as a geoprocessing service, it does not update the geodatabase. It also does not provide any errors and I'm not seeing anything helpful in the server logs. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's what it does perfectly from the desktop:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Receive a username and street address.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Geocode that address to an XY coordinate using ArcGIS Online.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Write the data to a feature class in a file geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) Use Intersect_analysis to combine this data with a totally unrelated data set in another geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5) Use Append_management to concatenate this new row of data onto a final feature class. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I publish this script a geoprocessing tool, it simply doesn't work - at least not completely. All I get by way of user feedback from the REST endpoint is the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Job Status:&amp;nbsp; esriJobSucceeded&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Results:&amp;nbsp; None &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The geodatabase does not get updated. This seems like it might be a permissions issue, so here's what I've done:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Registered the geodatabase in ArcGIS Server Manager.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Gave the ArcGIS User account Read, Write, and Modify permissions on the directory which contains the geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FWIW, my code is below. Any help would be much, much appreciated! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
# Import arcpy module
import arcpy, os

arcpy.AddMessage("Starting the script...")

varWorkingDirectory = r"C:\Data\GISData\SalesForceDemo"
#varWorkingDirectory = os.getcwd()

# Capture the user input
varCustomerName = arcpy.GetParameterAsText(0)
varAddress = arcpy.GetParameterAsText(1)
varCity = arcpy.GetParameterAsText(2)
varState = arcpy.GetParameterAsText(3)
varZip = arcpy.GetParameterAsText(4)

# Delete any old data in the TestAddresses table
arcpy.AddMessage("Deleting any old data in the TestAddresses table...")

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(varWorkingDirectory + r"\SFTest.gdb\TestAddresses")
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.deleteRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del row
&amp;nbsp;&amp;nbsp;&amp;nbsp; del rows
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Could not delete the old data from TestAddresses.")


# Insert the new data into the TestAddresses table so that it can be geoprocessed
arcpy.AddMessage("Inserting new data into the TestAddresses table...")

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.InsertCursor(varWorkingDirectory + r"\SFTest.gdb\TestAddresses")

&amp;nbsp;&amp;nbsp;&amp;nbsp; row = rows.newRow()
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Name = varCustomerName
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Address =varAddress
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.City = varCity
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.State = varState
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Zip = varZip
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.insertRow(row)

&amp;nbsp;&amp;nbsp;&amp;nbsp; # Delete cursor and row objects to remove locks on the data 
&amp;nbsp;&amp;nbsp;&amp;nbsp; del row 
&amp;nbsp;&amp;nbsp;&amp;nbsp; del rows
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Could not insert the new data into TestAddresses.")

# Delete the old output feature classes
arcpy.AddMessage("Deleting the old output feature classes...")

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Delete_management(varWorkingDirectory + r"\SFTest.gdb\CompletedGeocodingResults")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Delete_management(varWorkingDirectory + r"\SFTest.gdb\CompletedGeocodingResults_In")
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Could not delete the old data from CompletedGeocodingResults and CompletedGeocodingResults_In.")

# Local variables:
TestAddresses = varWorkingDirectory + r"\SFTest.gdb\TestAddresses"
World_GeocodeServer = "GIS Servers\\arcgis on geocode.arcgis.com (user)\\World.GeocodeServer"
RadonNew = "C:\\Data\\GISData\\ROE\\NewRadonData.gdb\\RadonNew"
CompletedGeocodingResults = varWorkingDirectory + r"\SFTest.gdb\CompletedGeocodingResults"
FinalGeocodingResultsWithRadon = varWorkingDirectory + r"\SFTest.gdb\CompletedGeocodingResults_In"

# Process: Geocode Addresses
try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.GeocodeAddresses_geocoding(TestAddresses, World_GeocodeServer, "Address Address VISIBLE NONE;Neighborhood &amp;lt;None&amp;gt; VISIBLE NONE;City City VISIBLE NONE;Subregion &amp;lt;None&amp;gt; VISIBLE NONE;Region State VISIBLE NONE;Postal Zip VISIBLE NONE;PostalExt &amp;lt;None&amp;gt; VISIBLE NONE;CountryCode &amp;lt;None&amp;gt; VISIBLE NONE", CompletedGeocodingResults, "STATIC")
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Could not perform GeocodeAddresses_geocoding.")

# Process: Intersect
arcpy.AddMessage("Performing Intersect_analysis...")

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Intersect_analysis(varWorkingDirectory + r"\SFTest.gdb\CompletedGeocodingResults #;C:\Data\GISData\ROE\NewRadonData.gdb\RadonNew #", FinalGeocodingResultsWithRadon, "ALL", "", "INPUT")
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Could not perform Intersect_analysis.")

# Append the new data onto the master featureclass
# Append_management (inputs, target, {schema_type}, {field_mapping}, {subtype})

arcpy.AddMessage("Performing Append_management...")

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Append_management(varWorkingDirectory + r"\SFTest.gdb\CompletedGeocodingResults_In", r"\SFTest.gdb\FinalGeocodingResults", "TEST","","")
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Could not perform Append_management.")


&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jun 2014 21:13:48 GMT</pubDate>
    <dc:creator>MatthewGerbrandt</dc:creator>
    <dc:date>2014-06-02T21:13:48Z</dc:date>
    <item>
      <title>Geodatabase not getting updated - No errors returned</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/geodatabase-not-getting-updated-no-errors-returned/m-p/499089#M16605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've got a geoprocessing service based on a python script. The script works great from ArcGIS Desktop but when run as a geoprocessing service, it does not update the geodatabase. It also does not provide any errors and I'm not seeing anything helpful in the server logs. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's what it does perfectly from the desktop:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Receive a username and street address.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Geocode that address to an XY coordinate using ArcGIS Online.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Write the data to a feature class in a file geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) Use Intersect_analysis to combine this data with a totally unrelated data set in another geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5) Use Append_management to concatenate this new row of data onto a final feature class. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I publish this script a geoprocessing tool, it simply doesn't work - at least not completely. All I get by way of user feedback from the REST endpoint is the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Job Status:&amp;nbsp; esriJobSucceeded&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Results:&amp;nbsp; None &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The geodatabase does not get updated. This seems like it might be a permissions issue, so here's what I've done:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Registered the geodatabase in ArcGIS Server Manager.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Gave the ArcGIS User account Read, Write, and Modify permissions on the directory which contains the geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FWIW, my code is below. Any help would be much, much appreciated! &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
# Import arcpy module
import arcpy, os

arcpy.AddMessage("Starting the script...")

varWorkingDirectory = r"C:\Data\GISData\SalesForceDemo"
#varWorkingDirectory = os.getcwd()

# Capture the user input
varCustomerName = arcpy.GetParameterAsText(0)
varAddress = arcpy.GetParameterAsText(1)
varCity = arcpy.GetParameterAsText(2)
varState = arcpy.GetParameterAsText(3)
varZip = arcpy.GetParameterAsText(4)

# Delete any old data in the TestAddresses table
arcpy.AddMessage("Deleting any old data in the TestAddresses table...")

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(varWorkingDirectory + r"\SFTest.gdb\TestAddresses")
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.deleteRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del row
&amp;nbsp;&amp;nbsp;&amp;nbsp; del rows
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Could not delete the old data from TestAddresses.")


# Insert the new data into the TestAddresses table so that it can be geoprocessed
arcpy.AddMessage("Inserting new data into the TestAddresses table...")

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.InsertCursor(varWorkingDirectory + r"\SFTest.gdb\TestAddresses")

&amp;nbsp;&amp;nbsp;&amp;nbsp; row = rows.newRow()
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Name = varCustomerName
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Address =varAddress
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.City = varCity
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.State = varState
&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Zip = varZip
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.insertRow(row)

&amp;nbsp;&amp;nbsp;&amp;nbsp; # Delete cursor and row objects to remove locks on the data 
&amp;nbsp;&amp;nbsp;&amp;nbsp; del row 
&amp;nbsp;&amp;nbsp;&amp;nbsp; del rows
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Could not insert the new data into TestAddresses.")

# Delete the old output feature classes
arcpy.AddMessage("Deleting the old output feature classes...")

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Delete_management(varWorkingDirectory + r"\SFTest.gdb\CompletedGeocodingResults")
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Delete_management(varWorkingDirectory + r"\SFTest.gdb\CompletedGeocodingResults_In")
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Could not delete the old data from CompletedGeocodingResults and CompletedGeocodingResults_In.")

# Local variables:
TestAddresses = varWorkingDirectory + r"\SFTest.gdb\TestAddresses"
World_GeocodeServer = "GIS Servers\\arcgis on geocode.arcgis.com (user)\\World.GeocodeServer"
RadonNew = "C:\\Data\\GISData\\ROE\\NewRadonData.gdb\\RadonNew"
CompletedGeocodingResults = varWorkingDirectory + r"\SFTest.gdb\CompletedGeocodingResults"
FinalGeocodingResultsWithRadon = varWorkingDirectory + r"\SFTest.gdb\CompletedGeocodingResults_In"

# Process: Geocode Addresses
try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.GeocodeAddresses_geocoding(TestAddresses, World_GeocodeServer, "Address Address VISIBLE NONE;Neighborhood &amp;lt;None&amp;gt; VISIBLE NONE;City City VISIBLE NONE;Subregion &amp;lt;None&amp;gt; VISIBLE NONE;Region State VISIBLE NONE;Postal Zip VISIBLE NONE;PostalExt &amp;lt;None&amp;gt; VISIBLE NONE;CountryCode &amp;lt;None&amp;gt; VISIBLE NONE", CompletedGeocodingResults, "STATIC")
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Could not perform GeocodeAddresses_geocoding.")

# Process: Intersect
arcpy.AddMessage("Performing Intersect_analysis...")

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Intersect_analysis(varWorkingDirectory + r"\SFTest.gdb\CompletedGeocodingResults #;C:\Data\GISData\ROE\NewRadonData.gdb\RadonNew #", FinalGeocodingResultsWithRadon, "ALL", "", "INPUT")
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Could not perform Intersect_analysis.")

# Append the new data onto the master featureclass
# Append_management (inputs, target, {schema_type}, {field_mapping}, {subtype})

arcpy.AddMessage("Performing Append_management...")

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Append_management(varWorkingDirectory + r"\SFTest.gdb\CompletedGeocodingResults_In", r"\SFTest.gdb\FinalGeocodingResults", "TEST","","")
except:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage("Could not perform Append_management.")


&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jun 2014 21:13:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/geodatabase-not-getting-updated-no-errors-returned/m-p/499089#M16605</guid>
      <dc:creator>MatthewGerbrandt</dc:creator>
      <dc:date>2014-06-02T21:13:48Z</dc:date>
    </item>
  </channel>
</rss>

