In my organization we use ArcGIS Server to serve up map services for our GIS users and other business applications. This year we are looking at re-organizing some of our map services. One of the tasks we have is to rename some of them. Have you ever tried to do that? I thought I would just use ArcCatalog to stop the map service, right click on the name, select rename and change it … but no, you cannot do that. So I tried using ArcGIS Server Manager, but nothing. Do I really have to delete it and recreate it again with the new name?
I did find this suggestion in one of the ESRI forums, but it is not for the faint of heart:
It is possible to change the name of a map service by renaming the config file (cfg) and changing the references inside the cfg file to match the new name. The cache folder will also need to be renamed to match the map service name. You will also need to restart your SOM Service and it’s probably a good idea to remove the existing map service from any existing web applications. A better way to handle this would be to rename the cache folder and publish a new map service to match the renamed cache folder. This will ensure that the map service is created correctly by ArcGIS Server.
What? I just want to rename the map service! Well, have no fear, the ArcGIS Server Administrator Directory is here! I’m using ArcGIS Server 10.1, so to get to it I entered the following in a web browser:
You are presented with a message about using ArcGIS Server Manager instead for managing services and how the Administrator Directory is intended for advanced programmatic access to the server. Ignore all of that and login using your ArcGIS Server admin user name and password. Once logged in, you are presented with a list of Resources and Operations.
Click on the services Resource. You are then presented with the root folder of your map services directory. Click through until you see the map service you want to change. For this exercise I created a map service named “test_image” that I will rename.
At the bottom of the listing in Supported Operations, click on renameService.
Enter your map service name, service type, and new service name.
Note since this is a map service, the Service Type is MapServer. My new map service name will be “test_image2”. Click on the Rename button and wait a little. Once done, you will see the new listing with the name changed.
That’s all there is to it. Do keep in mind if you change the name and your GIS users connected to the old name, they will need to re-add the service to their map or applications.
While you’re still in the ArcGIS Server Administrator Directory, click on the API Reference link in the upper right of the page. You can take a look at the renameService reference by scrolling down to Cluster > Rename Service
That is all for now. I hope this makes renaming map services a little less painful for you. If you know of a better way, please post a comment to share.