INF: Stored Procedures Can Be Nested 16 Levels Deep

ID: Q47465


The information in this article applies to:
  • Microsoft SQL Server versions 4.2x, 6.0, 6.5, 7.0

You can nest stored procedures in Microsoft SQL Server (that is, one stored procedure can call another). There is a limit of 16 levels (32 for SQL Server 7.0 and later) when nesting stored procedures. Attempting to exceed the maximum number of levels of nesting causes the whole calling procedure chain to fail, and an overflow error occurs. The current nesting level is stored in the @@nestlevel global variable.

Additional query words:

Keywords : kbprg SSrvStProc
Version : winnt:4.2x,6.0,6.5,7.0
Platform : winnt
Issue type :


Last Reviewed: November 8, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.