register a layer with sde in a feature dataset

2509
6
02-28-2014 07:06 AM
Highlighted
New Contributor III
I am using arcgis 10.2 with geodatabase.

I want to use the command
sdelayer -o register
to register an oracle spatial table with sde.
but I want to register it inside a feature dataset.
I didn't see a way to do that in the command line.

One more related problem
I registered the layer normally, and they I tried to move it to the feature dataset with arccatalog
but I was not able to do that, because I got the "unavailable" icon when the layer is over the feature dataset
although both (layer and feature dataset) share the same coordinate system
0 Kudos
6 Replies
Highlighted
MVP Regular Contributor
I can't find anything on how to directly register a table with the geodatabase inside a feature dataset using SDELAYER, either.  But, I also can't find anything that says Oracle Spatial object classes can't exist in feature datasets.   

How about trying to register the table at the root of the geodatabase but using another data storage type (SDELOB or ST_Geometry), then try moving it into a feature dataset using ArcCatalog, and THEN changing the geometry data storage type using SDELAYER -O MIGRATE ?  In other words, you might be able to move the newly-registered table into a feature dataset if you don't initially register it as SDO_GEOMETRY.  Maybe you already tried this... and that's what you meant by "I registered the layer normally".
0 Kudos
Highlighted
Occasional Contributor III
What William suggested could be the best workaround solution......can you please share with us a snapshot image when you perform copy/paste of the layer to the dataset.One thing came to my mind , can you create an empty layer with sdo_geometry storage and just upload the data from the table?
0 Kudos
Highlighted
Esri Esteemed Contributor
You cannot use ArcSDE command line tools to add anything to a feature dataset, ever.
Tools written with just the ArcSDE API are not geodatabase-aware.  Only ArcObjects-based
tools like ArcPy can manage feature dataset management.

- V
0 Kudos
Highlighted
New Contributor III
You cannot use ArcSDE command line tools to add anything to a feature dataset, ever.
Tools written with just the ArcSDE API are not geodatabase-aware.  Only ArcObjects-based
tools like ArcPy can manage feature dataset management.

- V


Thanks V
That explain what I found that using that sde command "SdeLayer" didn't register the feature class in the geodatabase.
Because I found that when I right-mouse click on it and show the context menu, the option "Register with geodatabase" is available.

I remember that registration has two phases, register with SDE and register with Geodatabase, and I  never understand what the difference between them.
So, my question, if I want to write a python script to register with the geodatabase, which arcpy commands I can use?
and do I have to register it with SDE first?
0 Kudos
Highlighted
Occasional Contributor III
you can use "arcpy.RegisterWithGeodatabase_management"

check this: http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000000r000000
0 Kudos
Highlighted
MVP Regular Contributor
I remember that registration has two phases, register with SDE and register with Geodatabase, and I  never understand what the difference between them.
So, my question, if I want to write a python script to register with the geodatabase, which arcpy commands I can use?
and do I have to register it with SDE first?


No, you don't. ArcSDE registration is an integral part of registering with the Geodatabase. So once you register a layer with the Geodatabase, it is also registered in ArcSDE system tables (but not the other way around: registering your layer with the "sdelayer" command in ArcSDE won't register it automatically with the Geodatabase).
0 Kudos