Tag Archives: C# development

[Solved] GP tool Call Error: ERROR 000824: The tool is not licensed.

Error reporting when calling GP tool

Last week, I wrote the code to call the two GP under esri.arcgis.datamanagementtools: createenterpriseodatabase and enableenterprise Geodatabase, that is, to create an enterprise database and convert the database into an enterprise database, but there are always errors. The error contents are as follows:

Executing: EnableEnterpriseGeodatabase
Start Time: Mon Nov 15 14:19:41 2021
Failed to execute. Parameters are not valid.
ERROR 000824: The tool is not licensed.
Failed to execute (EnableEnterpriseGeodatabase).
Failed at Mon Nov 15 14:19:41 2021 (Elapsed Time: 0.00 seconds)

When I manually execute the tool by using the tool in the toolbox provided by ArcGIS, the execution is successful. The execution parameters are as like as two peas, but the code execution is not a problem. Later, it was found that it was an authorization problem. The following permission initialization code was added to the code constructor or loading event. The problem was solved perfectly.

ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.EngineOrDesktop, ESRI.ArcGIS.LicenseLevel.GeodatabaseUpdate);