Attempting to Serve Features using a Spatial View from ArcSDE on SQL Server

Discussion created by jmitz on Jul 3, 2014
Latest reply on Jul 10, 2014 by jmitz
I�??m trying to serve up a feature service with ArcGIS Server 10.1 using a spatial view which is combining data from a feature class and a view that is in turn getting data from a linked server.

The last spatial view I made I used:

-Right click on Data Server Connection and select New.. View..
-Added info to �??Create New View�?? Dialog box
--View Name �?? spVwNewView
--View Definition �??
    AcesSites.objectid as ObjectId,
    AcesSites.shape as Shape,
    vwPermitDemographics.rid as Rid,
    vwPermitDemographics.siteid as SiteId,
    vwPermitDemographics.mediacode as MediaCode,
    vwPermitDemographics.interesttype as InterestType,
    vwPermitDemographics.EjScore as EjScore,
    vwPermitDemographics.CountyFips as CountyFips,
    vwPermitDemographics.FederalDist as FederalDist,
    vwPermitDemographics.StateHouseDist as StateHouseDist,
    vwPermitDemographics.SenateDist as SenateDist
from AcesSites right join vwPermitDemographics on AcesSites.rid = vwPermitDemographics.rid

--Click OK
-Checked view in ArcCatalog. Looks great
-Checked AcesSites layer description
--sdelayer �??o describe_long �??l AcesSites,shape �??i sde:sqlserver:ServerName -D DatabaseName -u OwnerId -p OwnerPassword
----SRID .................: 10
----Layer Envelope .......:
-----minx:    829100.56925,        miny:   1231910.70573
-----maxx:   1171534.30610,        maxy:   1848117.29983
----Layer Type ...........: In-Line Spatial Type/GEOMETRY
-Register view with sdelayer �??o register
--sdelayer -o register -l spVwNewView,shape -e p -t GEOMETRY -E 829100.56925,1231910.70573,1171534.30610,1848117.29983 -R 10 -C objectid -S "Permit Points with Demographics" �??i sde:sqlserver:ServerName -D DatabaseName -u OwnerId -p OwnerPassword
---Results �?? successfully added layer
-Attempt to build feature service with spVwNewView
--No  problem adding the layer to the mxd and display.
--Problem starts when I try to Share as Service
---Analyze give an error
----High       Unresolved        00059    Layer�??s data source is not registered with the geodatabase

Any guidance would be appreciated.