How does .mdx file store / use .sde connection

531
3
01-13-2014 07:57 AM
Highlighted
New Contributor
Hi,

I have a few MXD files that have a reference to a .sde file located in a common shared directory on the hard drive of a server C:\ArcGIS\DataConnections\FileDataConnection.sde. 

The .mdx files and name of the sde file are identical across the servers, but the content of this .sde file changes on each server to point to the appropriate database. 

The mxd files are copied from one server to the next, but I am having an issue when I open the mxd file on the target server, the mxd files are still pointing to the database referenced on the server the file was copied from. 

I have verified the reference to the file .sde file is correct and have verified the .sde file is connecting to the database I expect on the server. 

Does anyone know if ArcGIS embeds the .sde connection in each layer of the mxd file and not use the data from the .sde file as I assumed it would?

Thank you
Reply
0 Kudos
3 Replies
Highlighted
Esteemed Contributor
The sde connection information is indeed embedded inside the mxd and does not go to a .sde file to get the connection information.  This setup causes problems when you want to upgrade a database from say Oracle 10g to Oracle 11g where all the SDE connections need to be updated to reflect the updated Oracle Client information.  The same scenario would apply when you would want to connect to a different database.

My organization was hoping ESRI could change this methodology so the sde connection information could be sourced directly from the .sde connection file or use an environmental variable (Windows OS) to retrieve this information so it is not embedded, conceivably many times, in an mxd file.  This would make database upgrades far easier where you would only need to make changes to .sde files or environmental variables on individual computers instead of multiple times inside many mxd files.
Reply
0 Kudos
Highlighted
New Contributor
The sde connection information is indeed embedded inside the mxd and does not go to a .sde file to get the connection information.  This setup causes problems when you want to upgrade a database from say Oracle 10g to Oracle 11g where all the SDE connections need to be updated to reflect the updated Oracle Client information.  The same scenario would apply when you would want to connect to a different database.

My organization was hoping ESRI could change this methodology so the sde connection information could be sourced directly from the .sde connection file or use an environmental variable (Windows OS) to retrieve this information so it is not embedded, conceivably many times, in an mxd file.  This would make database upgrades far easier where you would only need to make changes to .sde files or environmental variables on individual computers instead of multiple times inside many mxd files.


Thank you for the quick answer, looks like more work for me than I wanted. It would be very nice for us also if we could have the same .sde file but different contents.
Reply
0 Kudos
Highlighted
Esri Esteemed Contributor
Saving connection information is a lose-lose propisition (as is not saving it).

If you base the project on a resource file that might not exist, you get an error.
If you hold connection information inside the project, you get an error.

If the user changes the connection options inside the project, and you use the old file,
you get an error.  If the connection file changes in a way the project would not support,
you get an error.

Right now, the connection information is stored in the project, as part of layer properties.
A tool to rewrite the project file could be, well, not a solution, but at least make the overall
experience less painful (check ideas.esri.com).

- V
Reply
0 Kudos