Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

share|improve this question
    
I searched out a solution but still could not get it work. How to get "sdetable -o register" command work with SQL Server on MS SQL Management Studio? Thanks –  alextc Apr 12 '12 at 0:56
add comment

1 Answer

You may like to use following command:

sdetable -o register -t <table> [{-c <row_id_column> -C {SDE|USER} } | {-C NONE} ] [-k <config_keyword>] [-i <service> | <port#> | <direct connection>] [-s <server_name>] [-D <database_name>] -u <DB_user_name> [-p <DB_user_password>] [-q]

However while you are at it, make sure that you specify -C ObjectID and -C User which will tell SDE that the ObjectID is the unique Id field and it is maintained by the user. You may like to refer to command reference for more info on this.

Hope this helps!

share|improve this answer
add comment

Your Answer

 
discard

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.