Select to view content in your preferred language

automate sde database license: python arcpy's EnableEnterpriseGeodatabase_management returns 000837 error i.e., "...not correct workspace type" no matter how I spedify. Does this command really work?

4622
4
03-04-2015 04:53 PM
howardfoster
New Contributor

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

0 Kudos
4 Replies
ModyBuchbinder
Esri Regular Contributor

Hi

Make sure your connection is to SDE user.

This is the user that can update metadata tables.

Habe Fun

0 Kudos
KishorGhatage
Occasional Contributor III

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

0 Kudos
George_Thompson
Esri Notable Contributor

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

GeodatabaseManaging Data

--- George T.
TinaMorgan1
Occasional Contributor II

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