Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How sqlserver encounters a rollback transaction

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains how sqlserver encounters a rollback transaction. The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how sqlserver encounters a rollback transaction.

Sometimes we use the "KILL" command to end a pending process. Once this happens, if SQL knows how to roll back the work, it will start the "real" rollback process and undo the work done. In some cases, SQL does not know and cannot control completed work, nor can it roll back work, in which case it will always be in a terminated / rollback state. How do you decide what action to take? It all depends on the actions taken by the SPID who was killed. You can only do a few things:

1. Wait patiently for the rollback to be completed. Some large operations may take a long time to roll back. Such a SPID shows changes in CPU, memory, and IO column sizes in sys.sysprocesses.

2. If SPID does not show any changes in the CPU, memory, and IO columns, it does nothing but find out which client machine spid comes from, enter the client machine, and end the process in the task manager.

3. If the client process has been killed on the client machine, but the database server still displays the process information and does nothing, you can only restart the SQL service

Thank you for your reading. The above is the content of "how sqlserver encounters rollback transactions". After the study of this article, I believe you have a deeper understanding of how sqlserver encounters rollback transactions, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report