AnsweredAssumed Answered

ArcGIS server 10.1 rest api queries fail inconsistently

Question asked by on Mar 2, 2015
Latest reply on Oct 30, 2017 by scooter

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.

  1. If I query a point layer the result works as expected and I get the data
  2. If I query a polygon layer like this, it fails:

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:

    1. I have not hit the max feature limit set on the server or the service
    2. the behavior is consistent across browsers
    3. the behavior is consistent using either get or post
    4. I have rebuilt the spatial indices
    5. 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