Answered by:
CDC Capture Job Failed with Error 217

Question
-
I try to enable the CDC function, the cdc capture job successfully with the Step 1 but failed in Step 2. The error given is as below:
Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32). [SQLSTATE 42000] (Error 217)
Before that, it was able to enable. I disabled it is because the transaction log grow and I unable to shrink it due to the log_reuse_wait_desc is Replication.
I try few times first few times, I was able to disabled and enable the CDC function. But recently, when I enable the CDC, it gives me the error above and cause the replication again.
Anyone can advise on this?
Friday, October 2, 2020 6:35 AM
Answers
-
Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).
Is there a user defined trigger on the table? This error comes when a trigger causing an other trigger to fire, which ends in an infinite loop; SQL Server raise then an error.
BTW, SQL Server related forums moved to Q&A: https://docs.microsoft.com/en-us/answers/products/sql-server
Olaf Helper
[ Blog] [ Xing] [ MVP]- Proposed as answer by Dave PatrickMVP Friday, October 2, 2020 12:21 PM
- Marked as answer by Dave PatrickMVP Monday, October 5, 2020 1:35 AM
Friday, October 2, 2020 10:56 AM
All replies
-
Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).
Is there a user defined trigger on the table? This error comes when a trigger causing an other trigger to fire, which ends in an infinite loop; SQL Server raise then an error.
BTW, SQL Server related forums moved to Q&A: https://docs.microsoft.com/en-us/answers/products/sql-server
Olaf Helper
[ Blog] [ Xing] [ MVP]- Proposed as answer by Dave PatrickMVP Friday, October 2, 2020 12:21 PM
- Marked as answer by Dave PatrickMVP Monday, October 5, 2020 1:35 AM
Friday, October 2, 2020 10:56 AM -
Hi,
Yes. There is another trigger function is enabled for the table. The trigger function to capture who updated the table.
We enable CDC and Trigger function since the beginning around last year Oct, no issue at all until this year June has the replication issue due to the transaction log growth and cause the space issue. That time we disable the CDC and shrink the database. After that enable again, no issue until recently it has this error where we are not able to enable the CDC function.
Sunday, October 4, 2020 11:57 PM -
I'd try asking for help in migrated QnA forums.
https://docs.microsoft.com/en-us/answers/products/sql-server
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by KHURRAM RAHIM Saturday, November 28, 2020 10:22 PM
Monday, October 5, 2020 1:34 AM