ObjectID's change when editing

3796
2
09-05-2012 11:02 AM
F__BenGrieger
New Contributor II
I recently upgraded our entire system from 10.0 to 10.1. We have a SQL Server 2008 R2 sde geodatabase and Desktop 10.1.

In the first major edit I did after the upgrade, I updated attributes on about 100 trees in our sde geodatabase. I noticed that ArcMap changed the ObjectID for the trees I edited. Note: these were existing trees that already had ObjectID's, all I did was update attributes.

The other new thing I've been doing is using a replica of the database on another server, so I put Global ID's in all my datasets. I've been seeing hints in other places that if GlobalID's are in use that it may change how ObjectID's are handled, but I can't find any direct documentation or explanation of that.

One immediate effect is that the ObjectID's in my local parent geodatabase are DIFFERENT from the objectID's for the same features in the child replica even after synchronizing.

Thanks for any explanation or resources you can offer to help me understand what is going on.
Tags (2)
0 Kudos
2 Replies
KevinGooss
Occasional Contributor
What exactly is the issue you are having with the changing oids?
Do you have some other external data that is linked by those ids?
It's always been recommended practice to never tie anything to oids as they are subject to change, especially when replicating or copying data to other formats.
Additionally, some feature classes can have multiple oid fields (like OBJECTID_1) which also makes it bad practice to rely on that field being named whatever you think it may be named.

The solution is to provide your own unique identifier (preferably a guid) or use esri's globalid. I believe, however, that the globalId will never repeat such that if you export the data or replicate it you will always get new globalIds.
0 Kudos
F__BenGrieger
New Contributor II
Kevin,

Here is a quote from ESRI's 10.1 help documentation (by the way it was the same in previous versions, too):

"The ObjectID value of a given object never changes as long as it remains in its original class and, if the object is a feature, you do not split it."

Note the word "never." So, simply editing attribute data should not cause the OID to change.

In my experience with replication, GlobalID's DO remain the same ( I'd think they must, because they are required for parent and child objects to be matched for synchronization), but of course they are extremely cumbersome so not as useable as the OID's for day to day work.

In any event, it seems to be a proven point in our shop that once you put GlobalID's in place, ESRI software no longer maintains Object ID's in the same way. I'd like to see a warning to that effect in the "add Global ID tool."

Thanks for your reply,
Ben
0 Kudos