SDE Connection files

1154
3
07-21-2017 08:32 AM
Highlighted
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.

https://community.esri.com/community/gis/enterprise-gis?sr=search&searchId=5868f4cb-1128-489c-89dd-a...https://community.esri.com/community/gis/managing-data?sr=search&searchId=35dbaaad-f6a9-4dc4-a7ce-52...‌ 

Tags (1)
3 Replies
Highlighted
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

Reply
0 Kudos
Highlighted
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...

Highlighted
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.