2

Where do I look to check how a feature class ObjectID is assigned? My understanding of the topic is there are two ways to populate the objectID field: let ArcSDE can supply it using a sequence or the user can supply an objectID.

I'm not looking to have a discussion about best practices and the pro's and con's of each approach.

I just need to know how I can check how the objectid for a feature class is populated and, depending on the what I find, set it to a user-defined objected.

This is ArcSDE 10.1 recently upgraded to 10.4

2
  • I'm curious to the reason(s) why you would want to have the ObjectID user-defined versus automatically defined?
    – whyzar
    Dec 1, 2016 at 21:08
  • Short answer: USER-set rowids are not supported by ArcGIS.
    – Vince
    Dec 1, 2016 at 23:38

1 Answer 1

1

Your understanding is no longer accurate. While ArcSDE had three different registration modes,

/************************************/
/***  Registered Table Row ID Types */
/************************************/
#define SE_REGISTRATION_ROW_ID_COLUMN_TYPE_SDE   1
#define SE_REGISTRATION_ROW_ID_COLUMN_TYPE_USER  2
#define SE_REGISTRATION_ROW_ID_COLUMN_TYPE_NONE  3

ArcObjects (and therefore Desktop and Server) really only has two (registered or not registered). If you ever tried to register a table already registered with ArcSDE (with USER-set rowid), ArcObjects would add a new rowid column (OBJECTID_1) as an SDE-set rowid.

This registered or not duality has always been the case. The change at 10.4.1 (really, all releases since ArcGIS 10.3.0) is that ArcSDE API backdoors are no longer available to corrupt enterprise geodatabase metadata (in fact, complications caused by the ability to use the ArcSDE API to corrupt table registration options is one of the primary reasons that API was deprecated).

If you want control over the registered column in a table, you can use SQL to define a table using native or SDE.ST_GEOMETRY geometry columns, using a trigger to populate from a sequence, and accessing the table via the Query Layers mechanism. However, Query Layers have tightly defined access and edit roles through ArcGIS -- They cannot participate in geodatabase behaviors (which requires geodatabase registration).

TL/DR: ArcGIS does not have a test for USER-set rowids, and cannot create them. You have a choice of registered or unregistered (Query Layers).

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.