So calculating geometry (area) on a 10.8.0.25 SQL 2014 Enterprise Feature Class, Geography Storage Type, GCS projection in 2.5, not registered as versioned, no branch versioning, archiving enabled returns
ERROR 130051: Input feature class is not registered as versioned.
Failed to execute (CalculateGeometryAttributes)
Drew Flater I recall this coming up in the past, can't find the GN post though, or maybe it was in EAP. Is there now a requirement that feature classes have to be registered as versioned to calculate geometry?
SQL trace shows
Violation of UNIQUE KEY constraint 'states_cuk'. Cannot insert duplicate key in object 'dbo.SDE_states'. The duplicate key value is (0, 0). as this is happening.
Hi Thomas Colson, I'm a little puzzled at this case, as our in-house test suite has cases just as you described that are passing and I just tried it myself in the application and the calc worked as expected.
If you look under the hood of Calculate Geometry Attributes, it uses arcpy.da.UpdateCursor to perform the updates. Some data sources and enterprise gdb configurations require an updatecursor in an edit session, some don't support edit sessions, it's really a grab bag. So the tool attempts to start and use an edit session when required or check that the cursor can retrieve data without the edit session. If it's not able to, it raises the error you described.
Attached is a screenshot of the test I ran using a SQL Server Enterprise GDB polygon feature class that has the Geography Configuration Keyword, GCS coordinate system, not registered as versioned, with archiving enabled. The Double field gets updated with the Area in sq miles as specified on the tool.
I can only say this is a case to report and work withing tech support, please.
All the best,
Drew
This may be a database issue I've since discovered. One feature (out of hundreds) has non-simple geometry, and SQL trace is showing other issues with the SDE core tables. This is an operational database that can't wait for TS to figure out what's wrong, our solution is going to be stand up a new SQL DB. With that said, I can open a case for the sole purpose of giving you a backup of the SQL DB, there is something going on with SDE that is causing GP tools to fail.
I too cannot calculate geometry, receiving the same error message - not registered as versioned:
Yet the data set is versioned: