Refreshing password on ArcGIS Server registered data store

177
0
04-15-2021 05:51 PM
SimonGIS
New Contributor II

Background:

Requirement:

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:

  • Preference to avoid arcpy, so that we can deploy script to Lambda. 
    • ArcGIS Python API or REST.JS can be used if required.

Q.1 Do you need Arcpy to create a .SDE file?

 

This Esri Script looks like it would meet my needs. 

  • Grabs the existing data items connection string
  • And then in step 6, update with new password

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?

SimonGIS_0-1618533294035.png

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?  

0 Kudos
0 Replies