Error "Invalid Cursor State" Connecting to Stored Procedure

Published: 27 Mar 2014
Last Modified Date: 16 Jun 2017


When you try to connect to a stored procedure, the following error might occur:
An error occurred validating the stored procedure connection.
[Microsoft] [SQL Server Native Client <version>]Invalid cursor state
Unable to connect to the server "<server name>". Check that the server is running and that you have access privileges to the requested database.


  • Tableau Desktop
  • Microsoft SQL Server


Add a SET NOCOUNT ON statement to the beginning of the stored procedure. For more information, see SET NOCOUNT (Transact-SQL) on Microsoft TechNet.

Did this article resolve the issue?