Hi all
We have some portfolio mxds that we manage for our organization. All users, including developers, have an SDE connection file in their personal folder on our network. i.e. each user has their own U:\drive and the connection looks like "U:\GIS\server.database.username.sde" where username is a variable. No password or username is stored with these connection files.
When creating an mxd to be shared with everyone, a developer will add SDE layers using their own connection file as specified above. When viewing a layer's source location info in the mxd, all that is shown is "vector" which is the name of the SDE database. No other path info for the connection file is displayed. I assume that the info for the connection file, including path is embedded in the mxd.
When another user opens the mxd, they are simply prompted for username and password and the mxd works fine. This happens even though they do not have access to the original connection file used to create the mxd. Once they open the mxd, I look at a layer's source location and it still just shows "vector".
Now I am trying to use a python script to adjust the connection file for an mxd we use to publish a map service. To start, this mxd uses a connection file with a services username and password embedded. To enable a power use to manage their map service, I want to change the SDE connection for each layer from the passwd embedded one, to a generic one with no passwd (i.e. the one we use for the shared mxds described above). I'm using the Findandreplaceworkspacepaths function, but I can't seem to come up with the target path combination that works right (i.e. just shows "vector" for the location).
I can swap the connection info to my SDE connection, but then it doesn't work for other users. If I specifically target the connection file for the user I want to maintain the mxd (has to be run as that user as it will not work if I'm logged in since I don't have access to their connection file), it works for them. However, they then add a new layer to the mxd using their connection file and when they open the mxd again, they get prompted to login twice as if there is a difference between the 2 sources, even though they are pointing at the same database.
Anyway, I know this is a bit out there, but I was hoping someone could provide more detail on exactly what is stored in the mxd for connection properties? I'd ideally like to replace the passwd embedded connection info with the same "exact" connection info that is stored in our shared mxds. However, I don't know what that info looks like when all I see is "vector". Thanks to anyone that might be able to provide a clue...
cheers, Gavin