English

Bug: Registering a DBMS view in ArcSDE with the sdelayer command fails with a -251 error

Description

When registering a DBMS view with the sdelayer adminstration command and the DBMS view contains an st_geometry attribute in Oracle, the following error may be encountered:

"D:\>sdelayer -o register -l parcels_view,shape -t st_geometry -i 5151 -e nac+ -C objectid,sde

ArcSDE 9.3 for Oracle10g Build 167 Fri Sep 5 12:00:46 2008

Layer Administration Utility
-----------------------------------------------------
Error: Not supported on a view (-251).
Error: Unable to alter registration for table parcels_view"

Cause

The -251 error, "Not supported on a view", is returned when a view is being registered with an SDE maintained sde_row_id attribute as specified in the sdelayer command's -C option. ArcSDE can only support SDE maintained sde_row_id attributes on table objects, not views.

Workaround

Do not register the view with a SDE maintained sde_row_id attribute. Set the sdelayer -C option for maintaining the sde_row_id to be user-maintained.

Code:
D:\>sdelayer -o register -l parcels_view,shape -t st_geometry -i 5151 -e nac+ -C objectid,user

ArcSDE 9.3 for Oracle10g Build 167 Fri Sep 5 12:00:46 2008
Layer Administration Utility
-----------------------------------------------------
Successfully Created Layer.

If the -251 error has already been encountered in an attempt to register the table, the sdetable -o delete command must be used to remove any orphaned metadata records that were created during the registration process that failed.