Groups | Search | Server Info | Login | Register


Groups > comp.databases.ms-sqlserver > #2279

Re: Error: Server stack limit has been reached

From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Error: Server stack limit has been reached
Date 2026-02-13 11:08 +0100
Organization Erland Sommarskog
Message-ID <XnsB3F2714D17650Yazorman@127.0.0.1> (permalink)
References <20260212120515.8ee4ab4592232e32b3f4a69b@g{oogle}mail.com>

Show all headers | View raw


Anton Shepelev (anton.txt@g{oogle}mail.com) writes:
> Hello, all
> 
> I am getting the following error from a third-party
> application:
> 
>    Microsoft SQL Native Client 11.0:
>    Server stack limit has been reached.
>    Please look for potentially deep nesting in your query,
>    and try to simplify it.
> 
> Yet I cannot seem to find a way to increase that limit.
> This occurs on MSSQL 13.0.1601.5, whereas the only
> mention of this error is in a bug fixed for a prior
> version:
> 
>   <https://support.microsoft.com/en-us/topic/kb2972996-fix-error-when-you-
execute-a-transact-sql-query-that-contains-a-long-case-statement-in-sql-
server-2012-3b98f46c-31a8-0e14-6946-c3abf0b63c37>
> 
> What are my options, then? -- contact the product's tech
> support?
 
A start would be to apply Service Pack 3 for SQL 2016. It may help. In any 
case, you should not run with the RTM version of SQL 2016.

You could also upgrade to a of SQL Server that is in mainstream support, 
that is SQL 2022 or SQL 2025. That presumes that the vendor support that
version. Then you could open a case directly with Microsoft.

But it may be better to open a case with the product vendor and let them
have the discussions with Microsoft. Of course, this assumes that the
vendor still support the version of the product that you are using.

I guess that one way to increase the stack limit is to slap on more RAM. 
But that will not help if this is a case of infinite recursion or similar.

Back to comp.databases.ms-sqlserver | PreviousPrevious in thread | Find similar


Thread

Error: Server stack limit has been reached Anton Shepelev <anton.txt@g{oogle}mail.com> - 2026-02-12 12:05 +0300
  Re: Error: Server stack limit has been reached Erland Sommarskog <esquel@sommarskog.se> - 2026-02-13 11:08 +0100

csiph-web