MSSQL SPID进程与另一个SPID进程混合 [英] MSSQL SPID process mix with another SPID process
问题描述
大家好,这是我加入这个社区以来的第一篇文章。抱歉我的英语不好。
Imgur:互联网上最棒的图片 [ ^ ]
请参考上面的图片链接:
SPID 51正在插入声明
SPID 60正在做更新声明
我不知道为什么SPID 60可以突然执行插入语句,该语句假设由SPID 51执行
我从跟踪中注意到的是每个SPID都有审核登录,RPC完成,审核注销。但SPID 51只是错过了审核注销。
如果我运行sp_who2,它将显示SPID 60被SPID 51阻止
我想知道这怎么会发生?网络问题会导致这个吗?请帮帮我,谢谢。
我尝试了什么:
因为我不知道这是怎么发生所以我没有尝试任何解决方法
Hello all, this is my first post ever since I joined this community. Sorry for my poor English.
Imgur: The most awesome images on the Internet[^]
refer to the above image link:
SPID 51 was doing insert statement
SPID 60 was doing update statement
I have no ideas how come SPID 60 can out of sudden execute the insert statement which suppose to be execute by SPID 51
What I notice from the trace is that each SPID will have Audit Login, RPC Completed, Audit Logout. But SPID 51 just missing the Audit Logout.
If I run the sp_who2, it will show SPID 60 is blocked by SPID 51
If I run report from SSMS, it shows SPID 51 isolation "Unknown"
I wonder how can this happen? Could network issue causing this? Please help me, thank you.
What I have tried:
Since I have no idea how this happen so I have not try any way to solve it
推荐答案
也许你可以设置最大并行度到1,一般不建议这样做,但是如果你必须......
如何:配置可用于并行查询的处理器数量(SQL Server Management Studio) [ ^ ]
以下是设置MAXDOP查询提示的示例:
Maybe you can set the "Max Degree of Parallelism" to 1, in general this is not recommended though, but if you must ...
How to: Configure the Number of Processors Available for Parallel Queries (SQL Server Management Studio)[^]
Here is an example of setting the MAXDOP query hint:
USE AdventureWorks2008R2 ;
GO
SELECT ProductID, OrderQty, SUM(LineTotal) AS Total
FROM Sales.SalesOrderDetail
WHERE UnitPrice <
5 。 00
GROUP BY ProductID,OrderQty
ORDER BY ProductID,OrderQty
OPTION (MAXDOP 1 跨度>);
GO
5.00 GROUP BY ProductID, OrderQty ORDER BY ProductID, OrderQty OPTION (MAXDOP 1); GO
这篇关于MSSQL SPID进程与另一个SPID进程混合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!