KNOWLEDGE BASE

Error "Invalid Cursor State" Connecting to Stored Procedure


Published: 27 Mar 2014
Last Modified Date: 21 Jul 2016

Issue

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.

Environment

  • Tableau Desktop
  • Microsoft SQL Server

Resolution

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?