When performing SP_WHO2, I notice some hanging processes in which LastBatch is equal to 01/01 00.00.00. Why does this happen and how to deal with it? Does it affect anything at all?
- Judging by the LastBatch documentation, this is the last time that a session called some stored procedure. And then zero time should say that this session did not cause any stored procedures. and that's absolutely fine - Mike
- @Mike My code in the last question killed processes on LastBatch, is this the most efficient parameter or is there a parameter that will have a better effect? I do not know, waiting time for example any? - aaa
- Given that killing processes, the main problem still does not solve any parameter will not give what is needed. I would still look at sleeping processes holding locks. - Mike
- @Mike I agree with you, but now people are already working in it, there are no programmers who would do it, you need to get at least a temporary solution to this problem, let it be closing processes, without a difference, the main thing is that people could normally work. Can you tell me how to solve this problem better and faster? Maybe you could change that my code to my needs? And if we succeed, we will look further. - aaa
- @Mike I defragment indexes and re-index them, even clearing the cache every 5 minutes, it helps, but not when the processes hang (probably they are also blocked by the server), I set the cleaning process more than 5 minutes according to LastBatch, but it doesn’t bring such an effect I would like to. There were cases of information loss and loss (error of the main window when exiting) of the necessary processes, i.e. not what is needed, although it helps. What can be done in this situation? Any DB optimization which I did not mention above can? - aaa
|