Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After making a check in from an arcpad AXF file, i notice that there's duplicate ObjectID records.

This ArcSDE PostgreSQL table is versioned and edited by Axf checkins and a .net engine application.

The weird behaviour is that the ObjectIDs from checkin start from the last ObjectID checked in from AXF in the last time, but between these times i added several records using the .net app so the ObjectIDs produced here are duplicated by the last check in, the .net app adds record directly through PostgreSQL, so i set the ObjectID to (Max(ObjectID) + 1).

i'm using ArcSDE 10.1 and PostgreSQL 9.0.8.

i'm not sure but i suppose that the problem comes from generating ObjectID in .net app level.

How could I generate an ObjectID and inform ArcSDE that this ObjectID has been used ?

share|improve this question
Would it be helpful to add a Global Unique Identifier (GUID)? – Roy Aug 14 '12 at 19:42
i avoided GUID because it's much harder to generate GUID to insert row from .net app, using pgsql query. – geogeek Aug 14 '12 at 19:57
up vote 3 down vote accepted

Here are two possible solutions for your problem:

1) Modify the ArcSDE System tables from your .NET application. The SDE_LAYERS and SDE_TABLE_REGISTRY tables contain rows that represent your table. The row for your table has a MINIMUM_ID field value, which is what the geodatabase will use when it inserts new rows.

I don't recommend making changes to the ArcSDE tables, as they are used by the geodatabase. It is risky.

2) Alter your table's registration with the sdetable command so that the geodatabase does not assign IDs automatically. This is the -C USER option. Then, create a sequence in your database that assigns unique integer IDs to new rows.

I prefer this method as it ensure that a single entity (the database) is now responsible for assigning IDs, and both ArcSDE and your code will need to worry about it.

share|improve this answer
i'm a newbie in Arcsde, i tried the commands, but it seems that i'm missing something, it seems i don't have a service, how to make it ? C:\Users\hp>sdeservice -o list SDE service Information ------------------------------------------------------------------ Sde service doesn't exist or is not registered properly. – geogeek Aug 15 '12 at 0:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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