Resolving OleDB Error Server stack limit has been reached 8631

Product Feature: Data mart

Operating System: Windows 2008 R2 2012

Database: SQL Server 2008 R2 2012




 

Issue

When running a deeply nested query on SQL Server 2008 R2 or 2012 the following error is seen:

 OleDb Error:Server stack limit has been reached.  Please look for potentially deep nesting in your query and try to simplify it.  ErrorInfo: 8631.


 

Cause

Bug in SQL Server 2012 and 2008 R2


 

Resolution

UPDATED: August 24, 2017
 This Error has been addressed for SQL Server 2012 at: http://support.microsoft.com/kb/2972996

NOTE: This error is not documented as having been fixed in any available patches or service packs available for SQL Server 2008 R2.  Therefore it is possible that the problem may have been corrected in one of these releases, but not publicly documented.