Map services, SDE and locks
Any map service (Including ArcIMS and Dekho map services), that connects to ArcSDE feature classes, places a schema lock on the dataset that is participating in the associated map service.
A schema lock occurs when another application is accessing the database object (featureclass/table), and you are attempting to alter its structure by, for example:
a) adding or removing a field or;
b) adding or removing a feature class / table
If the Feature class resides in a Feature Dataset, there will also be a lock on *all* the other Feature classes in the Feature dataset.
Also, if your data is Versioned and you are editing and compressing your SDE data on a regular basis, it is important, that their are no applications accessing the data when running the SDE compress command or tool. If there are, the edits will not move to the Business / base table due to the locking application.
To disable the map service schema lock, you can set the tag to false. This tag can be added to the services configuration file (.cfg) for the map service found in
C:\Program Files\ArcGIS\server\user\cfg
OR
C:\Program Files (x86)\ArcGIS\Server10.0\server\user\cfg
More information on this tag can be found via the ArcGIS Server web help:
http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#//0093000000mr000000.htm
To set this parameter you need to do the following:
1. Stop the SOM service
2. Open the .cfg file for the map service located in C:\Program Files\ArcGIS\Server 10.0\server\user\cfg (or alternatively
C:\Program Files\ArcGIS\server\user\cfg )
3. Edit the file by adding the following line false
to the Properties tag as follows:
<ServerObjectConfiguration>
<Description></Description>
<Properties>
<FilePath>C:\Data\Mxds\ToSDE\Parcels.mxd</FilePath>
<OutputDir>c:\arcgisserver\arcgisoutput</OutputDir>
<VirtualOutputDir>http://lap-302241/arcgisoutput</VirtualOutputDir>
<SupportedImageReturnTypes>URL</SupportedImageReturnTypes>
<MaxImageHeight>2048</MaxImageHeight>
<MaxRecordCount>500</MaxRecordCount>
<MaxBufferCount>100</MaxBufferCount>
<MaxImageWidth>2048</MaxImageWidth>
<IsCached>false</IsCached>
<CacheOnDemand>false</CacheOnDemand>
<IgnoreCache>false</IgnoreCache>
<ClientCachingAllowed>true</ClientCachingAllowed>
<CacheDir>c:\arcgisserver\arcgiscache\Parcels</CacheDir>
<SOMCacheDir>c:\arcgisserver\arcgiscache</SOMCacheDir>
<SchemaLockingEnabled>false</SchemaLockingEnabled>
</Properties>
<Extension>
…
…
4. Save and close .cfg file
5. Restart SOM service
6. You can make a schema change while the map service is running.
This tag is really useful for clients whose data is registered as versioned and compress their data regularly or are performing schema changes on a nightly basis through ArcGIS geoprocessing tools via Python or some other ArcGIS Process.
MapServer
一个布尔标记,决定地图服务是否将获得来自地理数据库的地图图层的方案锁。默认情况下,会获得该锁,因此该属性为
true。如果此锁妨碍了您的工作流,则可添加此标记,并将其设置为 false 禁用方案锁。
在禁用方案锁时请谨慎操作。如果未获得方案锁,其他用户将能够更改数据集的方案,这会对使用地图服务的用户产生难以预料的影响。应当仅在工作流明确要求禁用方案锁时才禁用方案锁。
默认情况下,在服务配置文件中不包含
<SchemaLockingEnabled> 标记。如果需要禁用方案锁,则必须显式添加该标记,并将其设置为 false。
http://esriaustraliatechblog.wordpress.com/2011/11/30/map-services-sde-and-locks/