SQL Spatial Views & ArcGIS Server

1260
3
Jump to solution
11-29-2017 05:24 AM
ErnestoCarreras4
New Contributor III

vangelo-esristaff

Hi, I have been having issues when publishing spatial views to ArcGIS Server. For some reason, even though the views are fully functional in Desktop environment and other clients, when published to ArcGIS Server and used in a web map/apps, the same won't display any features. Is this an expected behavior? Is there something that I need to do in order to have them work in Server? BTW, the spatial views are stored in a registered SDE database.

Thanks in advance.

Reply
0 Kudos
1 Solution

Accepted Solutions
ThomasColson
MVP Frequent Contributor

Need more info. Database flavor/version? Arcmap version? GIS Server Verion? Windows or Linux? When you execute the view in the native database management interface, does it return any results? How are you publishing the view from ArcMap to the server? Are you running any GP tools to create the view? The most likely problem is that the service account that ArcGIS Server is running under doesn't have permission to either the view, or the source tables behind the view. On the ArcGIS server, at the REST endpoint for the server, what happens when you POST a query?

View solution in original post

3 Replies
ThomasColson
MVP Frequent Contributor

Need more info. Database flavor/version? Arcmap version? GIS Server Verion? Windows or Linux? When you execute the view in the native database management interface, does it return any results? How are you publishing the view from ArcMap to the server? Are you running any GP tools to create the view? The most likely problem is that the service account that ArcGIS Server is running under doesn't have permission to either the view, or the source tables behind the view. On the ArcGIS server, at the REST endpoint for the server, what happens when you POST a query?

View solution in original post

ErnestoCarreras4
New Contributor III

Can't understand how I forgot to set the privileges to the view. That fixed the issue.

Also, it alerted me that it was missing the spatial index but it is my understanding it is not supported with spatial views. The warning was High, will that affect negatively the rendering of the map when using large datasets? Is there a way to update views using a web app?

ThomasColson
MVP Frequent Contributor

There are ways you can create indexes on views, and I do so for most of my views. Create Indexed Views | Microsoft Docs  but that implies the schema of the tables driving the views won't change, as once you create a view with schemabinding and put an index on it, you can't change the schema of the tables without first deleting the view. For large datasets, I'd also look /blogs/HackingArcSDE/2015/07/07/witch-magic-snake-oil-medicine-and-spatial-index-tuning?comment=3802.... Even just stabbing at a few index grid levels without going through the snake oil can greatly improve draw and query performance. So if you have a spatial index (or 5) on your base tables, and a non-clustered attribute index on your view, it should draw fast(er).