Hi all,
I manage a number of SDE databases and would like to update the yearly re-licensing with a python script. The script model:
import arcpy
arcpy.EnableEnterpriseGeodatabase("C:\myconnections\database1.sde", "C:\authfiles\keycodes")
when the correct path + file references are substituted, always returns the error:
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000837: The workspace is not the correct workspace type.
Failed to execute (EnableEnterpriseGeodatabase).
I've tried the various arcpy.ClearWorkspaceCache_management() and arcpy.env commands as suggested by other posts, but no go.
Thankee, -Howard Foster
Hi
Make sure your connection is to SDE user.
This is the user that can update metadata tables.
Habe Fun
Could you please try this:
import arcpy
arcpy.EnableEnterpriseGeodatabase(r"C:\myconnections\database1.sde", r"C:\authfiles\keycodes")
Options for Authorizing an Enterprise Geodatabase | Support Services Blog
hope this is helpful
Hi Howard,
From what I read in your original post, you want to update the licenses in your enterprise geodatabases?
If so, the Enable tool will not do this. This tool is designed to add the SDE repository tables to an existing database (SQL Server, Oracle, PostgreSQL, etc...)
Enable Enterprise Geodatabase GP Tool
"The Enable Enterprise Geodatabase tool creates geodatabase system tables, stored procedures, functions, and types in an existing enterprise database, thereby enabling geodatabase functionality in the database."
Here is a Blog that talks about updating the enterprise database license
In a nut shell, you must use SDE command line to update the license before it expires.
Please let me know if this is not what you are looking for.
-George
To add to George's comment, here is the workflow to authorize 10.3 SDE where the SDE Command line tools are no longer used...
Options for Authorizing an Enterprise Geodatabase | Support Services Blog