This is the normal process using ArcCatalog :

enter image description here

I want to automate this process using sdeLayer or any tools - does anybody have an idea as to how to do it?

there is an application sdelayer (sdelayer.exe) in "C:\Program Files\ArcGIS\ArcSDE\pgexe\bin" i want to create a command line to register featurelayer

sdelayer -o register -l <table,column> -e <entity_mask> -t <storage_type>
{[-C <row_id_column>[,{SDE|USER}[,<min_ID>]]]} [Spatial_Index]
[-E <{empty | xmin,ymin,xmax,ymax}>] [{-R <SRID> | [Spatial_Ref_Opts]}]
[-S <layer_description_str>] [-k <config_keyword>]
[-i {<service> | <port#> | <direct connection>}] [-s <server_name>]
[-D <database_name>] -u <DB_user_name> [-p <DB_user_password>] [-q]
  • database name : sde user : mr password : test feature layer name : parcel parcel column geometry : shape port postges : 5433 user PostgreSQL/arcsde : postgres password PostgreSQL/arcsde : test2 server : localhost
    – Mounaim
    Oct 11, 2013 at 9:44
  • i want to know that why registering as versioned is necessary. Because if it helps to track a record of delete and add ( Delta Tables), then what is the function of checking or uncheking the option of " Moving the edits into a base table"...?
    – user36353
    Aug 28, 2014 at 8:02

3 Answers 3


You got the wrong sde* command. sdelayer is for the spatial data in a SDE table. The sdetable column is for working on the table, such as adding/removing columns, adding indexes, etc.

You can register a table for SDE with something like this:

sdetable -o register -t railroads -i 5151 -u scott -p tiger -s localhost

When you want to have it versioned in the normal way, use the -V switch:

sdetable -o register -t railroads [...] -V MULTI

And when you want to move edits to base, use hybrid:

sdetable -o register -t railroads [...] -V HYBRID

My table has a column ID, and it needs to be the OBJECTID column, so I specify:

sdetable -o register -t railroads [...] -V HYBRID -C sde -c ID


Try using Register As Versioned (Data Management) GP tool. This GP tool can be used in a Python script:

import arcpy
sde_workspace = r"C:\databasegeo.sde" #path to your .sde file connection on disk
fcs_list = arcpy.ListFeatureClasses()
for fc in fcs_list:
    arcpy.RegisterAsVersioned_management(fc, "EDITS_TO_BASE")
  • please @Alex do you know how to do it with VB.net ? Dim toolR As ESRI.ArcGIS.DataManagementTools.RegisterAsVersioned = New ESRI.ArcGIS.DataManagementTools.RegisterAsVersioned
    – Mounaim
    Oct 11, 2013 at 10:10
  • @AbdelMounaimTAOUSSI, do you want to use the GP tool in your VB code? I guess you could just use ISQLSyntax to get the name of the owner and IVersionedObject to register a featureclass (and other household work) as versioned. help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/…. Unfortunately, cannot provide any specific details since I don't work with VB that much. Oct 11, 2013 at 10:18
  • there is an application sdelayer (sdelayer.exe) in "C:\Program Files\ArcGIS\ArcSDE\pgexe\bin" i want to create a command line to register featurelayer
    – Mounaim
    Oct 21, 2013 at 11:03
  • 1
    You cannot register a feature class/table as versioned by using ArcSDE Commands. They are not aware of geodatabase behaviour. You need to use GP tool/Python/ArcObjects. sdelayer.exe has register option which is for registering the table with SDE, not to register as versioned. Oct 21, 2013 at 11:54
  • 1
    I bet you can use IVersionedObject in ArcObjects to iterate through multiple feature classes. If not, then use Python or ModelBuilder (it has Iterate Feature Classes iterator). Oct 21, 2013 at 13:54

solved (thank you @Alex ) so this is a sample code that i used to register one feature class so after that we can iterate feature class to register them:

   Public featureLayer1 As IFeatureLayer = New FeatureLayerClass
   featureLayer1.FeatureClass = featureWorkspace.OpenFeatureClass("parcels")
   Dim pVersionedObject As IVersionedObject

   pVersionedObject = featureLayer1.FeatureClass

     'Determining if the feature class is registered as versioned
     If pVersionedObject.IsRegisteredAsVersioned = False Then
        'regester feature as versionned 
     End If 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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