Restarting a service where the source data are .mdb files

1535
0
01-14-2014 08:37 AM
YohanBienvenue
Occasional Contributor II
Hi, I'm looking for advice and answers for the following goal:

We are in the process of automating the update process of our map services on ArcGIS Server 10.1. What happens is that when the data source .mdb files are modified (which happens on a regular basis), the map services have to be republished. The reason for this is that with ArcGIS Server 10.1 you cannot just register a folder where your .mdb data is located and then publish your service. That only works with file geodatabases (.gdb). With .mdb, the data is copied to some ArcGIS Server folder at publish time of the map service (even if our data is already on the same server). This means that whenever the .mdb data changes, we have to republish the map service to redo this copy process.

Currently we do this directly from within ArcGIS Desktop. We open the .mxd file and publish the service.

We want to automate this process using the ArcGIS REST API. So that if a script detects the .mdb files have changed, then the map services are republished automatically.

I already have a semi-working solution. It's a JAVA program where I've implemented functions that can send the generateToken, startService, deleteService, createService, etc.. HTTP requests to ArcGIS Server, with all the appropriate parameters. To republish a service I do: deleteService, createService and startService.

However creating the service is almost instant. Usually when we do it manually in ArcGIS Desktop it takes 5 minutes to copy everything, so the .mdb data is not recopied. In fact I just tested the map service and although the layers are there, the map is blank.

I should also mention that for the createService request, you have to provide the path to a .msd file (I know .msd files are depreciated and replaced with .sd files now, but this is what the 10.1 documentation says createService needs). I created such a file using a python script including arcpy.mapping.AnalyzeForMSD(mxd) and arcpy.mapping.ConvertToMSD(mxd,msd,"","NORMAL","NORMAL"). There are no errors and the .msd file is created successfully.


So, before I go on with this approach, I was wondering if someone could advise me if what I'm trying to do make senses. I tried my best following the ArcGIS Server 10.1 documentation, but I'm starting to feel I might be trying to do something that's not possible.

We may have the option to convert our .mdb files to .gdb at some point. But that is a different issue for us, and I was asked to first see if I could implement this process with .mdb files.

Many thanks
0 Kudos
0 Replies