[GIS] Update license for enterprise geodatabase with GP/Python

arcgis-desktoparcgis-serverenterprise-geodatabaseesri-geodatabaselicense

I am attaching dozens of database files to a SQL Server instance and then I have to run sdesetup command to update the geodatabase license by pointing to my ArcGIS Server license. I am trying to find a way to automate this process.

Two ways to update the license (as to my knowledge are):

1.Connect to geodatabase instance as administrator user in ArcGIS Desktop (ArcMap for instance) and then use the Update ArcGIS Server License window to browse to the .ecp file or keycodes file.

enter image description here

2.Use sdesetup –o update_key ArcSDE command line to update the license. These command line utilities are going to be deprecated soon, though.

enter image description here

Neither of these alternatives provide any way to automate the process. In the latest Esri blog post on this topic, there was no information on this apart from what I have outlined above. I have not found any related ideas on ArcGIS Ideas either.

Is there any other way I am not aware of? Do you know if Esri is going to provide tools for automating license update process?

Best Answer

You can also backdoor it with a SQL script. The license string is stored in the SDE_SERVER_CONFIG table (SQL Server) or SERVER_CONFIG (Oracle) take a look in one of your existing licensed geodatabases using your SQL tool for the "AUTH_KEY" property and write an update statement that updates this record in the SERVER_CONFIG table in your other geodatabases. There is nothing illegal about doing this if the string you copied is from a geodatabase in the same instance (or even a different instance on the same physical site). You are just doing exactly what the "sdesetup -o update_key ..." command is doing.

Related Question