--核心语句在这里 DELETE Db_Tank..Sys_Users_History WHERE UserID IN (SELECT UserID FROM #temp_Robot)
报错信息:
Location: lckmgr.cpp:9421 Expression: NULL == m_lockList.Head () SPID: 56 Process ID: 5972 Location: "xact.cpp":2630 Expression: !m_updNestedXactCnt SPID: 56 Process ID: 5972 Description: Trying to use the transaction while there are 1 parallel nested xacts outstanding Location: "xact.cpp":2788 Expression: !m_updNestedXactCnt SPID: 56 Process ID: 5972 Description: Trying to use the transaction while there are 1 parallel nested xacts outstanding Location: "xact.cpp":3851 Expression: !m_parNestedXactCnt SPID: 56 Process ID: 5972 Description: Trying to use the transaction while there are 7 parallel nested xacts outstanding Location: "xact.cpp":2879 Expression: !m_updNestedXactCnt SPID: 56 Process ID: 5972 Description: Trying to use the transaction while there are 1 parallel nested xacts outstanding 消息 3624,级别 20,状态 1,第 1 行 系统断定检查已失败。有关详细信息,请查看 SQL Server 错误日志 消息 0,级别 20,状态 0,第 0 行 当前命令发生了严重错误。应放弃任何可能产生的结果。
系统日志报错:

【2】排查办法
(1)使用select count(1) from Db_Tank..Sys_Users_History
发现也是卡顿,连查询都不能查,明显有问题啊。count(1) 探索的是聚集索引列
(2)查看表结构 sp_help Sys_Users_History

只有一个userid的聚集索引,正好我们删除也是用它来关联的。估计问题就出在这里了。
当然,这只是经验之谈,如果没什么经验的朋友建议运行DBCC CHECKDB 检查一下这个库。
【3】解决办法,重建索引
use db_tank go alter index PK_Sys_Users_History on Sys_Users_History rebuild
OK,搞定!
【4】总结
出了问题不要慌,要想办法定位原因,然后得以解决
系统断定检查已失败。有关详细信息,请查看 SQL Server 错误日志
标签:ons robot div process users esc 时报 spi color
本文系统来源:https://www.cnblogs.com/gered/p/12144516.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!