<?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 Geodatabase and Replication in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/published-geodatabase-and-replication/m-p/782655#M1652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you anything readily available or give some pointers to automate whole process&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jul 2015 11:58:43 GMT</pubDate>
    <dc:creator>shafitrumboo</dc:creator>
    <dc:date>2015-07-06T11:58:43Z</dc:date>
    <item>
      <title>Published Geodatabase and Replication</title>
      <link>https://community.esri.com/t5/geodatabase-questions/published-geodatabase-and-replication/m-p/782653#M1650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We want to use published database for ArcGIS Server Map services for performance reason. These Map services will be used by application where user can view the data no write access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. What type of database should we use file or SQL read only&lt;/P&gt;&lt;P&gt;2. What is type of database replication available in ArcGIS server that we can run as overnight process to transfer data from Production to publish database&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2015 20:13:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/published-geodatabase-and-replication/m-p/782653#M1650</guid>
      <dc:creator>shafitrumboo</dc:creator>
      <dc:date>2015-07-04T20:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Published Geodatabase and Replication</title>
      <link>https://community.esri.com/t5/geodatabase-questions/published-geodatabase-and-replication/m-p/782654#M1651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shafi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Base on my experience only....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q1 - We use to publish read-only data from ArcSDE, but with the advancements to the file geodatabase (FGDB), and the fact that it can be stored on the local ArcGIS Server machine, I find the FGDB is faster. [however, our master data is stored, edited, managed, and maintained in ArcSDE]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Q2 - If you need the ups to happen live and in real time, then mayb the ArcSDE is the way to go.&amp;nbsp; For our shop, we usually take a new snapshot of the data at various intervals (monthly or as needed -- to a new temporary FGDB), do some additional process and testing on our EDN/development machine. Then when I'm ready to update on the services, it is relatively fast.&amp;nbsp; I use python scripts to do all the processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main reason I prep on the dev machine before publishing is because to replace the FGDB and services, the services have to be shut down when I replace the FGDB.&amp;nbsp; Again, this can be scripted so it can be done relatively fast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what works for us, but there may be better methods for your shop with ArcSDE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jul 2015 20:29:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/published-geodatabase-and-replication/m-p/782654#M1651</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-07-04T20:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Published Geodatabase and Replication</title>
      <link>https://community.esri.com/t5/geodatabase-questions/published-geodatabase-and-replication/m-p/782655#M1652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you anything readily available or give some pointers to automate whole process&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 11:58:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/published-geodatabase-and-replication/m-p/782655#M1652</guid>
      <dc:creator>shafitrumboo</dc:creator>
      <dc:date>2015-07-06T11:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Published Geodatabase and Replication</title>
      <link>https://community.esri.com/t5/geodatabase-questions/published-geodatabase-and-replication/m-p/782656#M1653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shafi,&lt;/P&gt;&lt;P&gt;The tool I use is the stop/start/delete tool in the ArcGIS Server Administration Toolbox &lt;A href="http://www.arcgis.com/home/item.html?id=12dde73e0e784e47818162b4d41ee340" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.arcgis.com/home/item.html?id=12dde73e0e784e47818162b4d41ee340&lt;/A&gt;&amp;nbsp; by &lt;A href="https://community.esri.com/migrated-users/3147" target="_blank"&gt;Kevin Hibma&lt;/A&gt;​&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't finalized/generalize my scripts yet to incorporate this script into a Stop/Replace/Start routine, so I do it in three steps. Run the script to stop, then do my renaming/replacing to the new FGDB that I already did all the magic to, then run the script to start every thing up again.&amp;nbsp; Downtime can be minimized this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my use, I've updated the parameters so I could hard code a default server-name, port, admin account.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="115730" alt="" class="image-1 jive-image" height="337" src="https://community.esri.com/legacyfs/online/115730_pastedImage_3.png" style="height: 337px; width: 258.346px;" width="258" /&gt;&lt;IMG __jive_id="115731" alt="" class="image-2 jive-image" height="262" src="https://community.esri.com/legacyfs/online/115731_pastedImage_4.png" style="width: 301px; height: 261.767px;" width="301" /&gt;&lt;/P&gt;&lt;P&gt;Once I enter the correct password, the Service List is populated so I can select what I services I would like to stop/start.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="115732" alt="" class="image-3 jive-image" height="209" src="https://community.esri.com/legacyfs/online/115732_pastedImage_0.png" style="width: 367px; height: 209.006px;" width="367" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script (with a little added comments):&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;'''
This script will stop or start all selected services selected after valid&amp;nbsp; ServerName, 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Port, AdminUser, AdminPassword, action (Stop/Start/Delete) are entered, and
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; services from populated service list are selected

Parameters required:
&amp;nbsp;&amp;nbsp;&amp;nbsp; - ServerName
&amp;nbsp;&amp;nbsp;&amp;nbsp; - Port
&amp;nbsp;&amp;nbsp;&amp;nbsp; - AdminUser
&amp;nbsp;&amp;nbsp;&amp;nbsp; - AdminPassword (SENT IN CLEAR TEXT! and will show in Results tab)
&amp;nbsp;&amp;nbsp;&amp;nbsp; - Stop or Start&amp;nbsp; (or delete....caution with this one...can leave option off ValueList if desired.)
&amp;nbsp;&amp;nbsp; -----&amp;nbsp;&amp;nbsp; Service(s) (multivalue list) ....this will be populated after above are input...
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; use check boxes to select those you want action to be applied to
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
Functions:
&amp;nbsp;&amp;nbsp;&amp;nbsp; - gentoken&amp;nbsp; (creates token required for Admin changes)
&amp;nbsp;&amp;nbsp;&amp;nbsp; - stopStartServices
'''

import urllib, urllib2, json
import arcpy

# Functions:
def gentoken(server, port, adminUser, adminPass, expiration=60):
&amp;nbsp;&amp;nbsp;&amp;nbsp; #Re-usable function to get a token required for Admin changes
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; query_dict = {'username':&amp;nbsp;&amp;nbsp; adminUser,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'password':&amp;nbsp;&amp;nbsp; adminPass,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'expiration': str(expiration),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'client':&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'requestip'}
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; query_string = urllib.urlencode(query_dict)
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; url = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;{}:{}/arcgis/admin/generateToken".format(server, port)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; token = json.loads(urllib.urlopen(url + "?f=json", query_string).read())
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; if "token" not in token:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddError(token['messages'])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; quit()
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return token['token']

def stopStartServices(server, port, adminUser, adminPass, stopStart, serviceList, token=None):&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; ''' Function to stop, start or delete a service.
&amp;nbsp;&amp;nbsp;&amp;nbsp; Requires Admin user/password, as well as server and port (necessary to construct token if one does not exist).
&amp;nbsp;&amp;nbsp;&amp;nbsp; stopStart = Stop|Start|Delete
&amp;nbsp;&amp;nbsp;&amp;nbsp; serviceList = List of services. A service must be in the &amp;lt;name&amp;gt;.&amp;lt;type&amp;gt; notation
&amp;nbsp;&amp;nbsp;&amp;nbsp; If a token exists, you can pass one in for use.&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; '''&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Get and set the token
&amp;nbsp;&amp;nbsp;&amp;nbsp; if token is None:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; token = gentoken(server, port, adminUser, adminPass)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Getting services from tool validation creates a semicolon delimited list that needs to be broken up
&amp;nbsp;&amp;nbsp;&amp;nbsp; services = serviceList.split(';')
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; #modify the services(s)&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for service in services:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; service = urllib.quote(service.encode('utf8'))
&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; op_service_url = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http://" target="_blank"&gt;http://&lt;/A&gt;&lt;SPAN&gt;{}:{}/arcgis/admin/services/{}/{}?token={}&amp;amp;f=json".format(server, port, service, stopStart, token)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status = urllib2.urlopen(op_service_url, ' ').read()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if 'success' in status:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddMessage(str(service) + " === " + str(stopStart))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddWarning(status)
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; return 


if __name__ == "__main__": 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Gather inputs&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; server = arcpy.GetParameterAsText(0) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; port = arcpy.GetParameterAsText(1) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; adminUser = arcpy.GetParameterAsText(2) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; adminPass = arcpy.GetParameterAsText(3) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; stopStart = arcpy.GetParameter(4) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; serviceList = arcpy.GetParameterAsText(5) 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; stopStartServices(server, port, adminUser, adminPass, stopStart, serviceList)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: I should add, that my scripts to create my new FGDB and feature datasets, and all the scripts to pre-process the data are so specific to my datasets, that they would not help you.&amp;nbsp; But if you have specific things that you have questions about, I may be able to supply snippets...and if needed, you may need to break them off to new questions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:54:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/published-geodatabase-and-replication/m-p/782656#M1653</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-12T08:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Published Geodatabase and Replication</title>
      <link>https://community.esri.com/t5/geodatabase-questions/published-geodatabase-and-replication/m-p/782657#M1654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have line,point and ploygon featureclasses&lt;/P&gt;&lt;P&gt;Does esri provides something that will allow us to replication only modified data from source to target (FGDB)&lt;/P&gt;&lt;P&gt;if not then replacing whole data will also work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Jan 2016 08:27:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/published-geodatabase-and-replication/m-p/782657#M1654</guid>
      <dc:creator>shafitrumboo</dc:creator>
      <dc:date>2016-01-24T08:27:37Z</dc:date>
    </item>
  </channel>
</rss>

