import arcpy mxd = arcpy.mapping.MapDocument(r"C:\Project\Project_default.mxd") mxd.findAndReplaceWorkspacePaths(r"C:\Project\Connection with password info saved.sde", r"C:\Project\Connection with no password info saved.sde", False) mxd.saveACopy(r"C:\Project\Project_NP.mxd") del mxd This should remove the saved password. Is this not working as you are expecting?
Allan:
Though not a solution for your current mxds, maybe a workflow change could resolve this issue in the future. Are the users who share the mxds actually making edits to the Oracle SDE data? Or are they just viewing the data and changing the labels and symbology for a specific project?
You might consider using lyr files for data that is shared in multiple mxds where you have a generic account with only viewing privileges with the password saved so the user does not need to know the credentials for the SDE connection. Then for the data editors, they would have specific SDE connections that only they would use with credentials only known by them. You would have a far greater number of mxds with just viewing privileges and a much lower number of mxds with specific editing privileges. The mxds with the editing privileges would not allowed to be shared so the editing privileges cannot be used by anyone but the individual with the specific editing privileges against the Oracle SDE database.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.