Enterprise geodatabases are licensed through an ArcGIS for Server authorization file. The geodatabase stores this authorization information to allow access to the geodatabase.
If your organization licenses ArcGIS for Server for a set time period, your geodatabase administrator can run the Update Enterprise Geodatabase License tool with a new ArcGIS for Server authorization file to update license information in the geodatabase before the existing license expires. This allows clients to continue working with the geodatabase without interruptions caused by expired licenses.
The input workspace must be an enterprise geodatabase. This tool does not work with file, personal, desktop, or workgroup geodatabases.
You must connect to the enterprise geodatabase as the geodatabase administrator to run this tool.
UpdateEnterpriseGeodatabaseLicense_management (input_database, authorization_file)
Provide a database connection (.sde file) to the enterprise geodatabase you want to authorize with a new ArcGIS for Server enterprise authorization file.
You must connect to the database as the geodatabase administrator.
Provide the path and file name of the keycodes file generated when you authorized ArcGIS for Server enterprise. If necessary, copy the file from the ArcGIS for Server machine to a directory that the tool can access.
ArcGIS for Server creates the keycodes file in the following location: \\Program Files\ESRI\License<release#>\sysgen (Windows servers) or /arcgis/server/framework/runtime/.wine/drive_c/Program Files/ESRI/License<release#>/sysgen (Linux servers).
UpdateLicense example 1 (Python window)
The following script can be run in a Python window to update license information in an enterprise geodatabase. In this example, the database connection file is enterprisegdb.sde and is located in a folder named gdbs. The keycodes file was copied to the temp folder.
import arcpy ent_gdb = "C:\\gdbs\\enterprisegdb.sde" authorization_file = "C:\\temp\\keycodes" arcpy.UpdateEnterpriseGeodatabaseLicense_management(ent_gdb,authorization_file)
UpdateLicense example 2 (stand-alone Python script)
The following is a stand-alone Python script you can alter and use to update the license information in an enterprise geodatabase.In this example, the database connection file is enterprisegdb.sde and is located in a directory named gdbs in the geodatabase administrators usr directory. The keycodes file was copied to a directory named scratch.
#Import arcpy module import arcpy #Local variables: ent_gdb = "/usr/gdbs/enterprisegdb.sde" authorization_file = "/usr/scratch/keycodes" #Process: Import authorization information from a new keycodes file. arcpy.UpdateEnterpriseGeodatabaseLicense_management(ent_gdb,authorization_file)
This tool does not use any geoprocessing environments
- ArcGIS Desktop Basic: No
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes