Sample Header Ad - 728x90

SET NOCOUNT Error in handling SQL call after upgrade

13 votes
1 answer
751 views
We are upgrading our test environment with a new server and updated version of Microsoft SQL Server and have run into an issue. On the new server, our old code will get "operation is not allowed when the object is closed" when executing some stored procedures. This message never appeared on the old server. When we tracked it down, the issue can be resolved by adding SET NOCOUNT ON; to the stored procedure. I looked at the defaults on the database and saw no settings that were different (SQL Server 2008 vs SQL Server 2014) related to defaults. What setting should I be looking at to resolve this globally without needing to add SET NOCOUNT ON to a thousand stored procs?
Asked by UnhandledExcepSean (333 rep)
Feb 27, 2019, 08:34 PM
Last activity: Mar 1, 2019, 04:04 AM