Select to view content in your preferred language

Geoprocessing Service - Lock Database Schema option missing

2772
2
03-22-2013 01:33 PM
MattLane
Frequent Contributor
In 10.1 sp1 I can avoid a service locking my SDE data by unchecking the "Lock Database Schema" box. This option is not available for a geoprocessing service. Is there a reason that it is missing, or a way for me to disable the schema locking for geoprocessing services?

Thanks in advance.
Tags (2)
0 Kudos
2 Replies
ErinBrimhall
Deactivated User
In 10.1 sp1 I can avoid a service locking my SDE data by unchecking the "Lock Database Schema" box. This option is not available for a geoprocessing service. Is there a reason that it is missing, or a way for me to disable the schema locking for geoprocessing services?

Thanks in advance.


Hi Matt,

I am unsure know why Esri does not expose a "Lock Database Schema" option for Geoprocessing services, but it may be possible for you to control this behavior programmatically.

If you create a lightweight Server Object Extension (SOE) for Geoprocessing services, you should be able to implement the Construct method off the IObjectConstruct interface and disable (or enable) schema locking on the workspace factory (and all workspaces it creates/manages).

Here is a quick/untested code snippet that you can try.

private IServerObjectHelper _serverObjectHelper;
private IWorkspace _workspace;

public void Init(IServerObjectHelper serverObjectHelper)
{
    _serverObjectHelper = serverObjectHelper;
    _workspace = (_serverObjectHelper.ServerObject as IGeoDataServerObjects).DefaultWorkingWorkspace;
}

public void Contruct(IPropertySet propertSet)
{
    // Disable schema locking
    (_workspace.WorkspaceFactory as IWorkspaceFactoryLockControl).DisableSchemaLocking();
}
0 Kudos
AjitDharmik
Occasional Contributor
Hi,

There is no such as an SOE for a GP Service. The extension model for GP is different, in that you create a custom GP tool in CPP, .NET or Java, execute it successfully in Desktop and then publish that as a GP Service.

Thanks!
Ajit
0 Kudos