Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I've been asked to fix a broken arcgis server site. I suspect the problem is that the paths in the mxd don't point correctly to the data files.

Without installing desktop is there some way to confirm that the paths are correct, and fix them if they are broken?

share|improve this question
add comment

5 Answers

up vote 5 down vote accepted

If by chance you're using Java Server, there is a utility to help which is located at:

<ArcGIS Server Installation directory>/arcgis/server10.0/java/tools/mappatheditor/startMapEditor.sh

http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_java_help/index.html#//0092000000p9000000.htm

Alternatively you could use arcpy.Mapping()* to fix datasources if you're using 10. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Updating_and_fixing_data_sources_with_arcpy_mapping/00s30000004p000000/

*this module is included with ArcGIS Server

share|improve this answer
1  
Fixing paths in MXDs/LYRs was a very well thought out workflow that we designed for 10.0. We wound up writing a very complete set of check and repair routines to do exactly what Kirk is trying to accomplish. –  Jason Scheirer Mar 22 '11 at 3:23
add comment

Have you opened up the MXD in a text editor? The layers and their connection info are there in plain text. This assumes you have access to the MXD file.

share|improve this answer
    
Surprisingly, this might work. When I opened one of my mxds in Notepad, the layer names were all in there, though there was an extra space between each letter. Example: C a l i f o r n i a I n t e r s t a t e s 0 S h a p e f i l e F e a t u r e C l a s s S h a p e 5ZqãѪ‚ ÀO£: < C : \ C A M a p s \ W o r k i n g \ T e m p S h a p e f i l e D a t a ZŽX›ÐѪ| ÀO£: D A T A B A S E < C : \ C A M a p s \ W o r k i n g \ T e m p –  jvangeld Mar 21 '11 at 21:06
    
You might be able to search for the relevant layer names and then just change the paths. –  jvangeld Mar 21 '11 at 21:10
2  
use notepad ++ create and macro on one an then automate folders - npp-community.tuxfamily.org/documentation/notepad-user-manual/… –  Mapperz Mar 21 '11 at 23:04
5  
PLEASE DON'T DO THIS! Those aren't spaces, those are null characters, and there is a lot more data than that in the actual data file (such as whether the file is a Shapefile or a Feature Class in a File Geodatabase etc). If you're on 10, use one of KHibma's solutions. The new arcpy.mapping methods for updating data sources are actually quite a bit more robust than the tools from versions before 10.0. –  Jason Scheirer Mar 22 '11 at 3:21
add comment

They ought to be able to fix that themselves. Right click the layer in the TOC, click Data -> Repair data source and browse to the correct file. Maybe that doesn't help you, if you don't have ArcGIS, but this is something any basic user should know how to do.

share|improve this answer
1  
desktop is not licensed or installed on this computer though. –  Kirk Kuykendall Mar 21 '11 at 20:13
add comment

MXD is a closed ESRI format (paths are definitely not stored in plain text), and as far as I'm aware of, there are no standalone programs that allow editing without an ArcGIS Desktop license (or similar). As you have ArcGIS Server, you have an ArcObject license, so you could technically write a simple app that would update the paths for you. However, it may be a lot less trouble to guide the client/end user through repairing the data source.

You can also look at similar previous thread for a reference: How do you deal with broken MXD\LYR paths ?

share|improve this answer
add comment

You could set the logging level to verbose in ArcGIS Server Manager, then restart the service. Any invalid layers should be reported in the log. I would recommend using something other than Server's web interface to view the log (.dat) file, though (I prefer baretail). This does not answer your question as to how to actually fix any broken links--how were the MXDs created in the first place?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.