Lock Database Schema - where to change default behavior?

6323
9
Jump to solution
10-24-2013 11:26 AM
bbieb
by
Occasional Contributor
When publishing an ArcMap document to ArcGIS Server, the "schemaLockingEnabled" is set to true by default.  Where in the ArcGIS configuration files can a person change this so the default is set to false?

http://resources.arcgis.com/en/help/main/10.2/index.html#//0154000005z9000000
brian
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
TanuHoque
Esri Regular Contributor
Starting at 10.1, you can toggle the switch from Desktop or on Manager.

Open a service's properties page, go to Parameter page, the option to toggle the switch is inside the "Properties" section.
Click "Save and Restart" button on the Manager or in Desktop click OK buttons to save and restart the service

(it is NOT needed to restart the entire ArcGIS Server service unlike ArcGIS Server pre-10.1 releases)

... but I was looking for a way so when adding a map service, the schemaLockingEnabled would default to false instead of true.

this is not currently supported.

View solution in original post

0 Kudos
9 Replies
NidhinKarthikeyan
Occasional Contributor III
Brian,


The locks acquired by ArcGIS Services could be disabled by modifying the ArcGIS service configuration file which has the naming convention <configuration name>.<service type>.cfg

For example, MyService.MapServer.cfg, under the <Properties> tag add a new tag

<SchemaLockingEnabled>false</SchemaLockingEnabled> to disable auto schema locking.


<ServerObjectConfiguration>
...
    <Properties>
         ...
         <SchemaLockingEnabled>false</SchemaLockingEnabled>
    </Properties>
</ServerObjectConfiguration>


Restart SOM service.


Regards,
0 Kudos
NidhinKarthikeyan
Occasional Contributor III
The blog post by Tania (ESRI Australia) might help you.
0 Kudos
bbieb
by
Occasional Contributor
Thanks for the responses.  I am at 10.2.  I did find the MyService.MapServer.json file where the parameter "schemaLockingEnabled": "true" is set for each individual map service but I was looking for a way so when adding a map service, the schemaLockingEnabled would default to false instead of true.

There is some code in the C:\Program Files\ArcGIS\Server\framework\runtime\tomcat\webapps\arcgis#manager\js\esri\arcgismanager.js file that looks like it is setting the check box within ArcGIS Manager.  I am not quite following the code so I am not sure if I can change it in here or not.  Plus I do not know if ArcMap calls some of these files when initially publishing.  I did watch the publishing process through Fiddler and didn't figure out what url was used to populate that field.

From arcgismanager.js:
_schemaLockingEnabledCheck:null

_setSchemaLockingEnabledAttr:function(_620){if(!_620){_620="true";}this._schemaLockingEnabledCheck.set("checked",_620==="true"?true:false);},_getSchemaLockingEnabledAttr:function(){return this._schemaLockingEnabledCheck.get("checked");}
brian
0 Kudos
TanuHoque
Esri Regular Contributor
Starting at 10.1, you can toggle the switch from Desktop or on Manager.

Open a service's properties page, go to Parameter page, the option to toggle the switch is inside the "Properties" section.
Click "Save and Restart" button on the Manager or in Desktop click OK buttons to save and restart the service

(it is NOT needed to restart the entire ArcGIS Server service unlike ArcGIS Server pre-10.1 releases)

... but I was looking for a way so when adding a map service, the schemaLockingEnabled would default to false instead of true.

this is not currently supported.
0 Kudos
bbieb
by
Occasional Contributor
Yes Tanu, I understand how to change the lock database schema on a service by service basis.  I have the instructions link in the original post.  We have made a business decision that all of our web services should have this feature turned off.  I am looking how to change this so when we add a new web service, it is unchecked by default.  There must a config file somewhere that can be changed so the default is set to false.  I realize that I can easily change it every single time I add a web service.  But as you know when you forget to do something and you have to make a change and restart a service it renders every other web service (within that specific folder) useless while it is being restarted.
brian
0 Kudos
AlisonGaiser
Occasional Contributor
Brian,

Did you ever find the answer to this? We have the same issue. I don't want to have to change every service post publish. I would prefer to do it pre publish.

Thanks,
     Alison
bbieb
by
Occasional Contributor
Alison,
Esri said it wasn't possible with the current architecture.  It was suggested I put in an enhancement request.

I did not dig any further into the .js files but that seemed like the logical place to change it globally.

Sorry.
brian
brian
0 Kudos
JasonGreenlaw
Occasional Contributor
I've discovered that this actually can be done during publishiing, but only if you're using Python/ArcPy.

The basic steps are as follows:

  1. Create a service definition draft using arcpy.mapping.CreateMapSDDraft(...)

  2. Open the service definition draft XML file generated by the previous step and look for the "<ConfigurationProperties>" element.  Underneath this element there is a <PropertyArray> element containing a series of <PropertySetProperty> entries, one of which contains the "schemaLockingEnabled" parameter.  You just need to change its <Value> to "false" instead of "true"

  3. Proceed with the remaining publishing steps, e.g. arcpy.mapping.AnalyzeForSD(...), arcpy.StageService_server(...), and arcpy.UploadServiceDefinition_server(...)


The XML item you're looking for should look something like this:
<PropertySetProperty xsi:type="typens:PropertySetProperty">
    <Key>schemaLockingEnabled</Key>
    <Value xsi:type="xs:string">true</Value>
</PropertySetProperty>


The XML editing can also be accomplished in python by using the xml.dom.minidom module.

I recommend taking a look at this help article which contains some good examples about the ArcPy publishing workflow as well as editing the service definition XML.
0 Kudos
MelanieWawryk
Occasional Contributor III

Idea posted to ideas pagehttps://community.esri.com/ideas/15221 

0 Kudos