Select to view content in your preferred language

Changing Service Datasource programmatically

2968
5
04-25-2016 11:58 PM
SebastianBosbach
Occasional Contributor

Hi everyone,

my Problem is that I want to create ArcGIS Services dynamic and therefore I need to change the data bindings of the mxd serving the service.

I'm able to create the service, to remove it and anything else, but i have no good idea how to change the bindings.

First I thought this could be done by the arcgis server rest api, but there is no method to change the data bindings of a service.

At the moment the only way I see ist to copy the template mxd for the service, publish it and when needed to do the following steps: stop the service, change the data binding of the service mxd with arcobjects and then restart the service.

So my questions is, is there a better way to change the binding?

PS: I don't want to change the binding and then publish the service, because this has to happen after a user action. So waiting to create a service is no option. I have to change the bindings on an already working service, to minimize the waiting time for users.

best regards

Sebastian Bosbach

0 Kudos
5 Replies
MichaelVolz
Esteemed Contributor

Can the source data be updated instead of binding to a completely different datasource?

0 Kudos
SebastianBosbach
Occasional Contributor

Unfortunateli no.

The source database is so large, that I wan't to separate the needed data for a user session into temporary tables.

Because one of the problems at the moment, is that when many users are working and moving ares etc. they all writing in the same giant tables, which results in performance drops.

0 Kudos
MichaelVolz
Esteemed Contributor

Can you break the table up in multiple services with a definition query dedicated to each specific user by area to alleviate the performance problems?

0 Kudos
SebastianBosbach
Occasional Contributor

This is one solution I have in mind, but not my preferred.

If i split it in multiple static services I'm wasting resources. I would have to run let's say 20-50 services, even if just one user is working or if many users are working.

The other drawback, is that we would have to change 20-50 mxd files and services if something needs to be changed.

So I'm searching for a dynamic solution.

PS: I have done much on solutions with cloud infrastructure and wan't to design the solution in a way it's dynamic scalable.

0 Kudos
JamesGough1
Esri Contributor

Would these resources be helpful?

Enabling dynamic layers on a map service in ArcGIS for Desktop

http://server.arcgis.com/en/server/latest/publish-services/linux/enabling-dynamic-layers-on-a-map-se...

Reorder layers in map service | ArcGIS API for JavaScript

Thank You,
Jim Gough | Technical Lead Enterprise - Educational Services
Esri
0 Kudos