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 seen questions about attemting to repair a .mxd file with broken links. What I would like to do is get ahead of this issue and "fix" it before it becomes a problem.

I have my data in an ArcSDE geodatabase. The SDE is being navigated to a new machine in the near future so the database connection properties will change. Is there anything I can do ahead of time to avoid broken links and slow loading maps?

Here is a similar but different question: How do you deal with broken MXD\LYR paths ?

Thanks for any advice.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

If you are on ArcGIS 10, you can use ArcPy to replace connections: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s30000004p000000.htm (which is one of the answers to question you referenced).

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project_default.mxd")
mxd.findAndReplaceWorkspacePaths(r"C:\Project\Connection to Default.sde", 
                                 r"C:\Project\Connection to Version1.sde")
mxd.saveACopy(r"C:\Project\Project_V1.mxd")

At my last job, the network guys created an alias (I think a DNS Alias Record) for the server. From then on, the actual machines could be swapped out and the alias record updated without having to touch the MXD or LYR files. Easy enough as long as the databases were the same (we were all direct-connections) and the connection parameters were the same. If they changed (such as user name or geodb version), I'd need to replace the paths (either manually or with findAndReplaceWorkspacePaths).

share|improve this answer
    
Thanks Jay! I think the DNS Alias is a great idea. Rather than typing the ip address into database connections, I'll use the alias. –  Paul May 12 '11 at 17:36
    
Thanks Jay, You just saved me a few hours of work! –  user3416 Jun 20 '11 at 21:59

Since it is RDBMS the trick I use for shapefiles won't work. I am about to undergo this (migrate my sde to a new machine) myself. I will look into it but...
I think that it won't matter. The connection is managed by arccatalog not the MXD document. If all the data stays the same just in a new gdb you should be fine.

The ultimately best scenario would be to have the new database named the same. with all the same users/schema.
And then with all the same table names the new connection would look (and be) exactly the same.

Anyway I will research and try to update ASAP.

share|improve this answer
    
I've done this once before with bad results, but I can't remember now if everything else besides the database stayed constant. –  Paul May 12 '11 at 6:23

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.