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.

How can one remove the saved username and password from arcgis layer (.lyr) files?

A scripted solution preferred but even a point and click method will be welcome.

share|improve this question

1 Answer 1

I've used the script linked below with fairly good success. I'm able to select, and repoint multiple lyrfiles to a separate database connection. It seems to choke on Annotation, and Grouped lyrfiles, but the time this saves makes it worth using.

I'm able to re-source an lyrfile from a database connection containing user information, to one with a partial connection. Now when a user tries to use one of these lyrfiles, they are prompted for a password. Note: ArcGIS typically holds user information during a session, so it's a good idea to shut down all your windows, and reopen ArcGIS to properly test.


share|improve this answer

Your Answer


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.