Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #2278 > unrolled thread

Error: Server stack limit has been reached

Started byAnton Shepelev <anton.txt@g{oogle}mail.com>
First post2026-02-12 12:05 +0300
Last post2026-02-13 11:08 +0100
Articles 2 — 2 participants

Back to article view | Back to comp.databases.ms-sqlserver


Contents

  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

#2278 — Error: Server stack limit has been reached

FromAnton Shepelev <anton.txt@g{oogle}mail.com>
Date2026-02-12 12:05 +0300
SubjectError: Server stack limit has been reached
Message-ID<20260212120515.8ee4ab4592232e32b3f4a69b@g{oogle}mail.com>
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?

-- 
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments

[toc] | [next] | [standalone]


#2279

FromErland Sommarskog <esquel@sommarskog.se>
Date2026-02-13 11:08 +0100
Message-ID<XnsB3F2714D17650Yazorman@127.0.0.1>
In reply to#2278
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.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.databases.ms-sqlserver


csiph-web