Fix lỗi update sql server


em bị lỗi như thế này khi update ạ

Đầu tiên phải xem cái procedure trong cái báo lổi là gì, function, procedure, trigger… Nó báo là bạn đã vượt quá số lần loop là 32.
Khả năng đó là 1 cái trigger, kiểm tra xem cái trigger đó có vấn đề gì về logi như bị gọi đệ qui vô tận ko? Nếu bạn thấy nó đúng nhưng chỉ vì gọi lồng nhau quá 32 nên bị lổi thì viết lại cái trigger đó, hoặc config lại database để nó ignore cái lổi đó. Lưu ý, nếu bạn inorge lỗi, nhưng cái trigger bạn bị lặp vô tận thì DB sẽ treo luôn.

sp_CONFIGURE 'nested_triggers',0
GO
RECONFIGURE
GO

The way you ask for a solution is truly pathetic. Just a screenshot with the error message, that’s it. No example of the SQL procedure, nothing at all. As an IT professional working with an IT product (here: SQL Server), you should at least know how to read error messages and search for solutions, which can be found either in manuals or online. These days, you can use Google Search or, more popularly, ChatGPT. If you don’t know how to do that, you should look for an easier job instead of working with SQL in IT.

Back to your question about the error message:

Msg 217, Level 16, State 1, …Maximum nesting level for stored procedures, functions, triggers, or views exceeded (limit 32)

Example: Search using the simplest and cheapest method: Google Search with “msg 217, Level 16, State 1
Step 1:


Step 2:

Step 3: study the solution manual.

I have no surprised of some young ITs can spend hours on social media but be panic with just a simple error message even the message is very clearly of error code and some refer to the logfile location.
It’s not only in this forum but also in many English for forum too.
This question still better than many others because he stills have a screenshot :slight_smile: In some case, we may read the topic 3+ times but still don’t know what the question is :smiley:

4 Likes
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?