AnsweredAssumed Answered

How to Stop / Start / Restart a Map Service using VB.Net?

Question asked by keags1 on Sep 22, 2014
Latest reply on Oct 27, 2015 by mvolz47

Hi all,


I have a map service which I am publishing through FlexViewer onto the web.

The service reads data which is updated daily, reading an Enterprise Geodatabase on our ArcServer.


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).

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:


How can I stop the map service, whilst the data is being updated?

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.

I can do it manually, however would prefer to do it in an Add-In, which is currently operational.


If this is not possible, then is it possible to remove the Schema Lock?

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.


I am using VS Express 2010, ArcGIS 10.2.2 and ArcServer 10.2.

I am also quite new working with ArcServer and Enterprise DB's, so please bear with me.


Thank you!