SDE Connection files

07-21-2017 08:32 AM
New Contributor II

Is there a way to use a script to edit the .sde connection files?  I have over 100 users with about 30 sde connection files on their desktops that I need to change the core server's name.‌ 

Tags (1)
3 Replies
MVP Frequent Contributor

Hopefully the SDE experts can weigh in, but until then this might offer a good starting point:

Updating and fixing data sources with arcpy.mapping—Help | ArcGIS for Desktop 

Chris Donohue, GISP

0 Kudos
MVP Regular Contributor

No, you cannot edit a *.sde connection file.

Your users use Windows Authentication or SQL Server Authentication? If it is Windows Authentication, you can simply create a Windows Authenticated connection file and provide that to the users...

MVP Esteemed Contributor

You can't edit with a script, but you could create a new one and then use a script to replace it (use the same target .sde file name). Test this first, of course.

one another note, we use Windows authorization now, and I have a general .sde name   me@<database>.sde.  This will then use the credentials of the user that is logged in, and the actual .sde filename can be the same for all.  The SQL of course determines which users have access based on the creds.  I found this easier to maintain when trying to standardize on an .sde file.  just a tip that might help in the future.