I understand the best practices and I am quite experienced with SQL server. I haven't seen this error before. Unfortunately the procedure is over 2,000 lines long and has a very complex process in a complex data model. Let me try to rephrase my question. The error is:
Msg 217, Level 16, State 1, Procedure MyNotification, Line 75
Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).
The call to MyNotification is done within a begin/end catch. Does that mean there is a nesting inside MyNotification, or is the error because there is a recursive CTE between the begin/end try? Thanks again.