How to convert int type field to ObjectID type recognised by ArcSDE?

807
2
Jump to solution
04-04-2012 09:43 PM
New Contributor III
Hello all,

I have a question for you to give me a hand please.

I have got an ordinary table with an OBJECTID column (type of int) in a SQL Server 2008 R2 instance. I need to store it in an ArcSDE geodatabase running on top of the SQL Server. The thing is how to make the OBJECTID field to the esri-compliant esriFieldTypeOID type so that feature operations through Feature Server can be applied down the track.

Any idea or tip would be really helpful! Thanks

Cheers, Alex
Reply
0 Kudos
1 Solution

Accepted Solutions
Esri Esteemed Contributor
If you have a table in a database where ArcSDE installed, and that table has a column
which maps to a 4-byte integer, and that column has the NOT NULL constraint, then
you can register it as USER-set registered rowid column via:

sdetable -o register -t table_name -c column_name -C USER -u owner ...

You can use ArcGIS to register the table with the geodatabase, but it's likely to
create a new column called OBJECTID and make it an SDE-set rowid.  ArcGIS will
not maintain USER-set rowid columns during editing operations, and in order to
make the table versioned, you'll need to register it as SDE-set ("-C SDE").

- V

View solution in original post

Reply
0 Kudos
2 Replies
Esri Esteemed Contributor
If you have a table in a database where ArcSDE installed, and that table has a column
which maps to a 4-byte integer, and that column has the NOT NULL constraint, then
you can register it as USER-set registered rowid column via:

sdetable -o register -t table_name -c column_name -C USER -u owner ...

You can use ArcGIS to register the table with the geodatabase, but it's likely to
create a new column called OBJECTID and make it an SDE-set rowid.  ArcGIS will
not maintain USER-set rowid columns during editing operations, and in order to
make the table versioned, you'll need to register it as SDE-set ("-C SDE").

- V

View solution in original post

Reply
0 Kudos
New Contributor III
Thanks V for the reply.

It seems that I need to run that command line to make a column an esri-type ID.
Reply
0 Kudos