As a sysadmin, I want to automate updating the database connection details in the ArcGIS Server data store settings, so that my services will continue to access the data in the database.
Challenges & Thoughts:
Q.1 Do you need Arcpy to create a .SDE file?
This Esri Script looks like it would meet my needs.
However, it makes no mention on how to encrypt the password.
Q3. Where does the variable sample_1 come from in the linked python script?
Q3. How do we encrypt the password?
Looking at the help for DataItem:
It is recommended that you encrypt the credentials using the encryption scheme before storing it into the server. This can be achieved by invoking Get Database Connection String tool inside the Publishing Tools toolbox published as a system service on the server.
This would indicate that there might be a step missing in the linked script. Struggling to find much documentation/samples on how to use 'Get Database Connection String' without a SDE file?