Error Message
When attempting to register a table as versioned in an enterprise geodatabase, the following error is encountered:
Error 01188: Column already exists. Column name 'SDE_STATE_ID' in table <table name> is specified more than once.
Cause
There are two main reasons why we may encounter this error:
- Inconsistencies in the delta (A and D) tables of a versioned geodatabase
- Inconsistencies within the system tables used to manage versions and states in a versioned geodatabase
Solution or Workaround
In some cases the following steps may resolve the error:
- Recalculate the spatial index on the dataset in question.
- Update the database statistics of business tables, feature tables, and delta tables, along with the statistics of those table's indexes using the Analyze geoprocessing tool.
- Repair inconsistencies within the versioning system tables of the geodatabase using the Repair Version Metadata geoprocessing tool.
- Repair inconsistencies in the delta (A and D) tables of the geodatabase using the Repair Version Tables geoprocessing tool.
Once these steps have been completed we can attempt to register the table as versioned again.