Apologies for posting this both here and GIS.stackExchange (ArcGIS server 10.1 rest api queries fail inconsistently - Geographic Information Systems Stack Exchange)
I have a set of Map and Esri Feature Services running on a 10.1 ArcGIS Server, with SQL Server in the back end.
When I query the layers for either the geometry or OIDs using the rest interface, the query only works in certain instances.
- If I query a point layer the result works as expected and I get the data
- If I query a polygon layer like this, it fails: http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?returnGeometry=true&f=json
I get the error message
to complete operation.","details":["Unable to perform query
The server log files show: Database error:
Operation without query criteria is not allowed.
However this query (same service, different polygon layer) works as expected and returns the feature geometry:
There are 2 polygon layers that I can query and get the expected result but all other polygon layers fail and for the life of me I cannot see any difference in the properties of the feature classes that fail vs those that do not.
If I dirty the query (by adding a where clause 1=1) I get the expected result; so for example, this query works:
What I’ve looked at:
- I have not hit the max feature limit set on the server or the service
- the behavior is consistent across browsers
- the behavior is consistent using either get or post
- I have rebuilt the spatial indices
- The behavior is consistent if I ask for json or html response
I’d be grateful for any pointers or areas that I should look at.
Thanks in advance!
Message was edited by: Asrujit SenGupta