We're having a very peculiar problem with the "Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)" error and I was just wondering if the circumstances rang a bell with anybody. I'm certainly not expecting any form of in-depth investigation - that's my job.
Here are the details:
- We continually run some automated tests. These call SPs etc. The database has triggers on tables.
- These are run on new restores of the same backup file.
- Restores are made to 2012, 2014, 2016, 2017 and 2019 instances on a number of different servers (i.e. we are running 2012 on several servers, 2014 on several servers, etc.)
- As of about a month and a half ago, we have had occasional instances of the nesting error.
- These have only been on 2012 instances - none on 2014, 2016, 2017 or 2019.
- They have only been on two particular 2012 instances - but not always on these two instances.
- We have five other 2012 instances where it has never happened.
- The error is reported in a stored procedure at a line where records are inserted in to a particular table.
- The table has a trigger. All that trigger does (apart from read operations) is write to a different table.
- That other table has a trigger, but no write operations, other than to itself.
What's perplexing us is the fact that it's an intermittent failure when there have been no code changes.
Does this ring a bell with anybody? i.e. mysterious "Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)" errors on a 2012 instance?
Thanks.