I need to create a spatial view on a feature class in a SQL Server ArcSDE Geodatabase. The Feature class uses GEOMETRY storage and so will the view.
The way I understand it, I should create the view using SQL, and then register it with sdelayer -o register.
I have created then view, which is quite simple: It joins two simple non-spatial tables to the feature class and uses those to filter out some of the rows in the feature class.
When I try to register the view I get this:
ArcSDE 10.0 for SQL Server Build 1937 Tue Aug 16 16:08:18 2011
Layer Administration Utility
-----------------------------------------------------
Error: Invalid entity type (-29).
Error: Cannot Create Layer.
I am using this command line (omitting connection stuff):
sdelayer -o register -l viewName,shape -e nslc+ -t GEOMETRY -R 3 -C OBJECTID,SDE -P HIGH -E 220997.27000,5266971.36500,1014476.46500,6613192.02000
The -e, -R and -E parameters are using values derived from sdelayer -o describe_long executed for the feature class, which provides this result:
ArcSDE 10.0 for SQL Server Build 1937 Tue Aug 16 16:08:18 2011
Layer Administration Utility
-----------------------------------------------------
Layer Description ....: <None>
Database : [removed]
Table Owner ..........: [removed]
Table Name ...........: [removed]
Spatial Column .......: SHAPE
Layer Id .............: 105
SRID .................: 3
Auth SRID.............: 25832
Minimum Shape Id .....: 1
Offset ...............:
falsex: -5120900.000000
falsey: -9998100.000000
System Units .........: 200.000000
Z Offset..............: 0.000000
Z Units ..............: 1.000000
Measure Offset .......: <None>
Measure Units ........: <None>
XY Cluster Tolerance .: 0.01
Spatial Index ........:
parameter: SPIDX_MSSQL
exist: Yes
array form: -6,0,0
Layer Envelope .......:
minx: 220997.27000, miny: 5266971.36500
maxx: 1013943.23500, maxy: 6613192.02000
Entities .............: nslc+
Layer Type ...........: In-Line Spatial Type/GEOMETRY
Creation Date ........: 09/22/12 17:35:38
I/O Mode .............: NORMAL
Autolocking ..........: Enabled
Precision.............: High
User Privileges ......: SELECT, UPDATE, INSERT, DELETE
Coordinate System ....: PROJCS["ETRS_1989_UTM_Zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIME
M["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing"
,0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
Layer Configuration ..: DEFAULTS
I am using SQL Server 2008 R2 sp1 on Windows Server 2008 R2 sp1 with ArcSDE 10.0 sp4.
Any thoughts?