Using arcpy and ArcGIS 10.1 SP1 (Build 3143) against an Oracle 11g enterprise geodatabase, I am trying to add an index to an existing attribute in an existing feature class:


Running as the table owner:

arcgisscripting.ExecuteError: ERROR 999999: Error executing function. Operation only allowed by the owner of the version [SDE.DEFAULT] Failed to execute (AddIndex).

The default version is Protected.

Running as SDE:

arcgisscripting.ExecuteError: ERROR 999999: Error executing function. Insufficient permissions Failed to execute (AddIndex).

As the feature class is owned by a different user than the version owner, what permissions are needed to add an index?

In ArcCatalog, the table owner can happily add an index.

As a workaround, is it possible to change the access of the default version via ArcPy?

  • 1
    Only the table owner can add an index. Versioning shouldn't have anything to do with the matter (if it does, then it's likely a bug). Are you running the terminal release of 10.1 (SP1 plus a score or two of patches)? Since it's too late to report as a bug (10.1 is in Mature status), if 10.1sp1 had that problem, I would check whether a new release still does (work back from 10.4.1, or forward from 10.2.2 + patches).
    – Vince
    Sep 27, 2016 at 13:31
  • @Vince Appreciate the response. I don't have the luxury of working in different versions of ArcMap, but can accept the behavior as a bug. Sep 28, 2016 at 11:57

1 Answer 1


I ran into this problem also. Data is owned by USER_A. USER_A attempts to add index by script and gets message "Operation only allowed by the owner of the version [SDE.DEFAULT] Failed to execute (AddIndex)", but USER_A is able to add index in ArcCatalog.

When SDE user tries to add index, it gets "Insufficient permissions Failed to execute (AddIndex)"

Work Around: If you can (big if), have the SDE user make the DEFAULT version public. Then, change back to protected after running the index script. Or, have the DBA give the SDE user CREATE ANY INDEX privilege.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.