<?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: How to Stop / Start / Restart a Map Service using VB.Net? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242316#M6270</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi K&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why not using python?&lt;/P&gt;&lt;P&gt;A full example here: &lt;A href="http://resources.arcgis.com/en/help/main/10.2/0154/0154000005qv000000.htm"&gt;http://resources.arcgis.com/en/help/main/10.2/0154/0154000005qv000000.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can put python script to run automatically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have fun&lt;/P&gt;&lt;P&gt;Mody&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Sep 2014 04:57:43 GMT</pubDate>
    <dc:creator>ModyBuchbinder</dc:creator>
    <dc:date>2014-09-23T04:57:43Z</dc:date>
    <item>
      <title>How to Stop / Start / Restart a Map Service using VB.Net?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242313#M6267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a map service which I am publishing through FlexViewer onto the web.&lt;/P&gt;&lt;P&gt;The service reads data which is updated daily, reading an Enterprise Geodatabase on our ArcServer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data is easily updated, and works well. UNTIL someone is reading the data from the web. I keep getting a Schema Lock error (000601).&lt;/P&gt;&lt;P&gt;If I stop the service and remove the user connection from the database "LOCKS" property, it the data is updated with 0 error. So my question is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I stop the map service, whilst the data is being updated?&lt;/P&gt;&lt;P&gt;I plan to do this at 2am, when every one should be offline. I just want to have this as a fail-safe should someone have left their PC on overnight and logged into the web-map.&lt;/P&gt;&lt;P&gt;I can do it manually, however would prefer to do it in an Add-In, which is currently operational.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not possible, then is it possible to remove the Schema Lock?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Again I can remove the DB User manually, however would prefer that all connections to the DB being accessed are cut for the short period data is being fed into the DB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using VS Express 2010, ArcGIS 10.2.2 and ArcServer 10.2.&lt;/P&gt;&lt;P&gt;I am also quite new working with ArcServer and Enterprise DB's, so please bear with me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 14:29:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242313#M6267</guid>
      <dc:creator>KeaganAllan</dc:creator>
      <dc:date>2014-09-22T14:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Stop / Start / Restart a Map Service using VB.Net?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242314#M6268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rather than looking for a way to remove that lock or stopping and restarting the Map Services, I would suggest that you disable Schema Locking for that Service itself.....no locks will be generated therefore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Disabling schema locking on a map service:&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//0154000005z9000000" title="http://resources.arcgis.com/en/help/main/10.2/index.html#//0154000005z9000000"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setting map service properties:&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//00sq0000009r000000" title="http://resources.arcgis.com/en/help/main/10.2/index.html#//00sq0000009r000000"&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, 22 Sep 2014 16:15:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242314#M6268</guid>
      <dc:creator>AsrujitSengupta</dc:creator>
      <dc:date>2014-09-22T16:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Stop / Start / Restart a Map Service using VB.Net?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242315#M6269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keagan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you looked at this help document on ArcGIS Server?&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Example_Stop_or_start_all_services_in_a_folder/0154000005qv000000/" title="http://resources.arcgis.com/en/help/main/10.1/index.html#/Example_Stop_or_start_all_services_in_a_folder/0154000005qv000000/"&gt;ArcGIS Help 10.1&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---one can utilize ArcGIS server admin rest api to administer server - including stopping and starting services.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shriram B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Sep 2014 16:44:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242315#M6269</guid>
      <dc:creator>ShriramBhutada1</dc:creator>
      <dc:date>2014-09-22T16:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to Stop / Start / Restart a Map Service using VB.Net?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242316#M6270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi K&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why not using python?&lt;/P&gt;&lt;P&gt;A full example here: &lt;A href="http://resources.arcgis.com/en/help/main/10.2/0154/0154000005qv000000.htm"&gt;http://resources.arcgis.com/en/help/main/10.2/0154/0154000005qv000000.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can put python script to run automatically&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have fun&lt;/P&gt;&lt;P&gt;Mody&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Sep 2014 04:57:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242316#M6270</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2014-09-23T04:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Stop / Start / Restart a Map Service using VB.Net?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242317#M6271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;I will try each of the options and let you know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 11:21:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242317#M6271</guid>
      <dc:creator>KeaganAllan</dc:creator>
      <dc:date>2014-10-02T11:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to Stop / Start / Restart a Map Service using VB.Net?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242318#M6272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can use also this sdk &lt;A href="https://github.com/skendrot/ArcGIS-Server-Admin-SDK/blob/master/VisuallyLocated.AGSAdmin/AdminService.cs" title="https://github.com/skendrot/ArcGIS-Server-Admin-SDK/blob/master/VisuallyLocated.AGSAdmin/AdminService.cs"&gt;ArcGIS-Server-Admin-SDK/AdminService.cs at master · skendrot/ArcGIS-Server-Admin-SDK · GitHub&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 13:56:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242318#M6272</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2014-10-02T13:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Stop / Start / Restart a Map Service using VB.Net?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242319#M6273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do not need to stop and restart the service if you perform a truncate and append of the datasource, if that is viable for your scenario.&amp;nbsp; You can create a model to perform the truncate and append and export it out to a python script that you can call from a Windows Scheduled Task at 2am in the morning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to you can stop or start a service with python ArcGIS admin scripts.&amp;nbsp; Below is a quick example both in 10.2.x and 10.3.x where the parameters are slightly different&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10.3.x&lt;/P&gt;&lt;P&gt;C:\Python27\ArcGIS10.3\python.exe C:\Program Files\ArcGIS\Server\tools\admin\manageservice.py -u "username" -p "Password" -s &lt;A href="https://gisdevops.chesco.org/"&gt;http://"arcgis_server_name&lt;/A&gt;" -n "Virtual_Directory_Name"/"Geocode_name".GeocodeServer -o stop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10.2.x&lt;/P&gt;&lt;P&gt;C:\Python27\ArcGIS10.2\python.exe C:\Program Files\ArcGIS\Server\tools\admin\manageservice.py -u "username" -p "Password" -s &lt;A href="https://gisdevops.chesco.org/"&gt;http://"arcgis_server_name&lt;/A&gt;" -t -n "Virtual_Directory_Name"/"Geocode_name".GeocodeServer -o stop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Username" -your username for AGS admin&lt;/P&gt;&lt;P&gt;"Password" -your password for AGS admin&lt;/P&gt;&lt;P&gt;"Virtual_Directory_Name" - folder where AGS service resides&lt;/P&gt;&lt;P&gt;"Geocode_name" - name of service in this case geocode so GeocodeServer is at end of line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These lines of code can be called from a bat file that can also be called from a Windows Scheduled Task.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start would be the same except for -o start&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 13:23:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-stop-start-restart-a-map-service-using-vb/m-p/242319#M6273</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2015-10-27T13:23:43Z</dc:date>
    </item>
  </channel>
</rss>

