<?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: What is the 'overwrite service' workflow when using service definitions? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/what-is-the-overwrite-service-workflow-when-using/m-p/547102#M21154</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to do this as well.&amp;nbsp;To run this,&amp;nbsp;do I need to have the feature class on the map before updating? I keep getting an error message" Dataset does not exist.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Apr 2019 18:10:36 GMT</pubDate>
    <dc:creator>AndrewClark2</dc:creator>
    <dc:date>2019-04-04T18:10:36Z</dc:date>
    <item>
      <title>What is the 'overwrite service' workflow when using service definitions?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/what-is-the-overwrite-service-workflow-when-using/m-p/547098#M21150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a server environment where we publish services via the 'create service definition - no server connection" in ArcMap, hand the .SD file off to an admin that then publishes the service via the web manager.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There's the option to 'overwrite a service' from ArcMap but it seems like this is only avialable for the connected workflow.&amp;nbsp; Is this process just a wizard that does the following steps in automation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create service definition&lt;/P&gt;&lt;P&gt;2. Import from existing service&lt;/P&gt;&lt;P&gt;3. Delete existing&lt;/P&gt;&lt;P&gt;4. Publish new&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So our workflow to "overwrite" in this disconnected environment is those 4 manual steps or is there a shortcut?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2018 17:41:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/what-is-the-overwrite-service-workflow-when-using/m-p/547098#M21150</guid>
      <dc:creator>FredSpataro</dc:creator>
      <dc:date>2018-06-07T17:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: What is the 'overwrite service' workflow when using service definitions?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/what-is-the-overwrite-service-workflow-when-using/m-p/547099#M21151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tried (upload .sd --&amp;gt; reupload .sd with the same name) this through the Manager GUI in a federated 10.5.1 Enterprise deployment and got the error message saying you can only create new services this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I know this can be accomplished with python. I've&amp;nbsp;broken up the script into two parts that can be run on your two machines, respectively:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Machine that creates .sd&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;##-------------------------Script Info----------------&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Objective: Create a service definition that can be used to overwrite an existing Map Service&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Andrew Valenski&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# 6/12/2018&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;##------------------Defining Variables----------------&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Import necessary modules&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; xml&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dom&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;minidom &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; DOM

&lt;SPAN class="comment token"&gt;# This defines the workspace that the script looks for the .MXD in&lt;/SPAN&gt;
workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'C:/TestSDCreation/'&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# This is the name of .MXD you're using to create the .sd&lt;/SPAN&gt;
mxdName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'sample.mxd'&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Create a .sd file on your server machine and make a local copy on this machine&lt;/SPAN&gt;
connectionFile &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'GIS Servers/arcgis on localhost_6080 (admin)'&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# This is the name of the service you're overwriting. &lt;/SPAN&gt;
serviceName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'MyMapService'&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Service Summary (Included to prevent warnings ... and its good to have)&lt;/SPAN&gt;
summary &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Population Density by County'&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Service Tags (Included to prevent warnings ... and its good to have)&lt;/SPAN&gt;
tags &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'county, counties, population, density, census'&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;##----------------Defining Paths--------------------&lt;/SPAN&gt;

finalMXD &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MapDocument&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;workspace&lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; mxdName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
sdDraft &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; workspace &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; serviceName &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'.sddraft'&lt;/SPAN&gt;
sd &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; workspace &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; serviceName &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'.sd'&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;##--------------Creating SD Draft-------------------&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# create service definition draft&lt;/SPAN&gt;
analysis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mapping&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CreateMapSDDraft&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;finalMXD&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sdDraft&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; serviceName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'ARCGIS_SERVER'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; connectionFile&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; summary&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; tags&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;##-------------Edit SD Draft------------------------&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# set service type to esriServiceDefinitionType_Replacement so it is understood as an 'overwriting' .sd&lt;/SPAN&gt;
owType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'esriServiceDefinitionType_Replacement'&lt;/SPAN&gt;
xml &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; sdDraft
doc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; DOM&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;parse&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;xml&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
descriptions &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; doc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getElementsByTagName&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Type'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; desc &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; descriptions&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; desc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;parentNode&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;tagName &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'SVCManifest'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; desc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;hasChildNodes&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; desc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;firstChild&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;data &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; owType
outXml &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; xml&amp;nbsp;&amp;nbsp;&amp;nbsp; 
f &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; open&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;outXml&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'w'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
doc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;writexml&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; f &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
f&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;close&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;##---------Create SD---------------------------&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Check for errors in the previous analysis and, if no errors exists, create the SD&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; analysis&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'errors'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;# Execute StageService&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;StageService_server&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sddraft&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sd&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Service Successfully Staged at: "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sd&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;# if the analysis had errors, stop the publishing and alert the user&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"SD Draft contains errors: "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;analysis&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'errors'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"No SD file created"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;##--------Complete----------------&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Now an SD file is generated that should be copied onto Machine 2 (the GIS Server)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Machine 2. uses Python to publish the .sd&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# Objective: Publish SD to GIS Server&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Andrew Valenski&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# 6/12/2018&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#-----------Import Modules---------------------&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

&lt;SPAN class="comment token"&gt;#-----------Define Variables-------------------&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# This should be the location that you copied the service definition to. The path should&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# match your exact path.&lt;/SPAN&gt;
finalSD &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'C:\SomeFolderOnServer\someServiceName.sd'&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Create a local .ags connection file and keep it in the folder (keeps things tidy)&lt;/SPAN&gt;
connectionFile &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'C:\SomeFolderOnServer\GISServerConnection.ags'&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;#----------Upload SD to Server-----------------&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Upload Service Definition (i.e. overwrite existing service using .sd)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UploadServiceDefinition_server&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;sd&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; con&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Service successfully overwritten"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd test it out in your environment first, but that should do the trick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:40:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/what-is-the-overwrite-service-workflow-when-using/m-p/547099#M21151</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T23:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: What is the 'overwrite service' workflow when using service definitions?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/what-is-the-overwrite-service-workflow-when-using/m-p/547100#M21152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Andrew,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me give that second script a try.&amp;nbsp; I didn't think about trying the arcpy method. If that single method handles overwrite it&amp;nbsp; might work for us but the admins don't usually have 'desktop' bits installed hence the use of the web manager.&amp;nbsp; Does the new python api handle this situation?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I might drop a "allow overwrite in web manager" in the ideas forum.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jun 2018 14:49:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/what-is-the-overwrite-service-workflow-when-using/m-p/547100#M21152</guid>
      <dc:creator>FredSpataro</dc:creator>
      <dc:date>2018-06-12T14:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: What is the 'overwrite service' workflow when using service definitions?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/what-is-the-overwrite-service-workflow-when-using/m-p/547101#M21153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Python API can handle publishing to portal (i.e. AGOL or a Portal for ArcGIS). If you AGE deployment is a Web GIS deployment (i.e. Federated, hosting, etc. etc.) then the API would be able to accomplish this (in simpler terms, I might add).&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 13:57:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/what-is-the-overwrite-service-workflow-when-using/m-p/547101#M21153</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-06-20T13:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: What is the 'overwrite service' workflow when using service definitions?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/what-is-the-overwrite-service-workflow-when-using/m-p/547102#M21154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to do this as well.&amp;nbsp;To run this,&amp;nbsp;do I need to have the feature class on the map before updating? I keep getting an error message" Dataset does not exist.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Apr 2019 18:10:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/what-is-the-overwrite-service-workflow-when-using/m-p/547102#M21154</guid>
      <dc:creator>AndrewClark2</dc:creator>
      <dc:date>2019-04-04T18:10:36Z</dc:date>
    </item>
  </channel>
</rss>

