欢迎来到天天文库
浏览记录
ID:30792503
大小:113.50 KB
页数:8页
时间:2019-01-03
《sqlserver-谈死锁的监控分析解决思路》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、SQLSERVER-谈死锁的监控分析解决思路阅读目录(Content)1背景1.1报警情况1.2如何监控2分析3解决回到顶部(gototop)1背景1.1报警情况最近整理笔记,打算全部迁移到EVERNOTEo整理到锁这一部分,里边刚好有个自己记录下來的案例,重新整理分享下给大家。某H中午,收到报警短信,DB死锁异常,单分蚀死锁120个。死锁的xml文件如下:复制代码12342、rocess810b00cf8"taskpriority="0"logused="0nwaitresource="RID:13:1:1541136:62"waittime="7682"ownerld=,,3396587959"transactionname="UPDATE"lasttranstarted=”2016-01-08T:L2:03:5:1.067”XDES="0xa99746d08"lockMode="U"schedulerid=,,41ukpid=n17308nstatus="suspendednspid=,,13、08nsbid=,,0"ecid=,,0npriority-'。”trancount=n2Hlastbatchstarted="2016-01-08T12:03:51.067ulastbatchcompleted="2016-01-08T12:03:51.067"lastattentionil900-01-01T00:00:00.067”dientapp="MicrosoftSQLServerManagementStudio-查询"hostname二"test・server”hostpid="1433"loginname="4、xinysu,1isolationlevel="readcommitted(2)"xactid="3396587959"currentdb="13,,lockTimeout="4294967295nclientoptionl="671098976"clientoption2="390200">565、9fb09a7fdl5239977c60000000000000000000000000000000000000000">7UPDATEFinanceReceiptNoRuleSETNowSeqValue=@ReturnNumJSRUNNING=,0,/LastWriteTime=GETDATE()WHERElsRunning='l,ANDSeqCode=@SeqCode81vinputbuf>2declare@SeqCodevarchar(60)3declare@Retur6、nNumbigint4set@SeqCode='CGJS20160106,5while(l=l)6begin7UPDATEFinanceReceiptNoRuleSETNowSeqValue=@ReturnNum/ISRUNNING=,0,,LastWriteTime=GETDATE()WHERElsRunning='l,ANDSeqCode=@SeqCode8endv/inputbuf>9107、248"waitresource=HKEY:13:72057594040090624(b3ade7c5980c)"waittime二”4“ownerld=n3396522828"transactionname=,,user_transactionHlasttranstarted=,,2016-01-08T12:03:05.310HXDES="0xl8cldb63a8"lockMode="U"schedulerid="57"kpid="16448"status二"suspended"spid="161"sbid="0"ecid8、="0"priority="0"trancount="2"lastbatchstarted="2016-01-08T12:03:58.737Hlastbatchcompleted=”2016・01-08T12:03:33.847”lastattention="2016-01-08T12:0
2、rocess810b00cf8"taskpriority="0"logused="0nwaitresource="RID:13:1:1541136:62"waittime="7682"ownerld=,,3396587959"transactionname="UPDATE"lasttranstarted=”2016-01-08T:L2:03:5:1.067”XDES="0xa99746d08"lockMode="U"schedulerid=,,41ukpid=n17308nstatus="suspendednspid=,,1
3、08nsbid=,,0"ecid=,,0npriority-'。”trancount=n2Hlastbatchstarted="2016-01-08T12:03:51.067ulastbatchcompleted="2016-01-08T12:03:51.067"lastattentionil900-01-01T00:00:00.067”dientapp="MicrosoftSQLServerManagementStudio-查询"hostname二"test・server”hostpid="1433"loginname="
4、xinysu,1isolationlevel="readcommitted(2)"xactid="3396587959"currentdb="13,,lockTimeout="4294967295nclientoptionl="671098976"clientoption2="390200">565、9fb09a7fdl5239977c60000000000000000000000000000000000000000">7UPDATEFinanceReceiptNoRuleSETNowSeqValue=@ReturnNumJSRUNNING=,0,/LastWriteTime=GETDATE()WHERElsRunning='l,ANDSeqCode=@SeqCode81vinputbuf>2declare@SeqCodevarchar(60)3declare@Retur
5、9fb09a7fdl5239977c60000000000000000000000000000000000000000">7UPDATEFinanceReceiptNoRuleSETNowSeqValue=@ReturnNumJSRUNNING=,0,/LastWriteTime=GETDATE()WHERElsRunning='l,ANDSeqCode=@SeqCode8
6、nNumbigint4set@SeqCode='CGJS20160106,5while(l=l)6begin7UPDATEFinanceReceiptNoRuleSETNowSeqValue=@ReturnNum/ISRUNNING=,0,,LastWriteTime=GETDATE()WHERElsRunning='l,ANDSeqCode=@SeqCode8endv/inputbuf>9107、248"waitresource=HKEY:13:72057594040090624(b3ade7c5980c)"waittime二”4“ownerld=n3396522828"transactionname=,,user_transactionHlasttranstarted=,,2016-01-08T12:03:05.310HXDES="0xl8cldb63a8"lockMode="U"schedulerid="57"kpid="16448"status二"suspended"spid="161"sbid="0"ecid8、="0"priority="0"trancount="2"lastbatchstarted="2016-01-08T12:03:58.737Hlastbatchcompleted=”2016・01-08T12:03:33.847”lastattention="2016-01-08T12:0
7、248"waitresource=HKEY:13:72057594040090624(b3ade7c5980c)"waittime二”4“ownerld=n3396522828"transactionname=,,user_transactionHlasttranstarted=,,2016-01-08T12:03:05.310HXDES="0xl8cldb63a8"lockMode="U"schedulerid="57"kpid="16448"status二"suspended"spid="161"sbid="0"ecid
8、="0"priority="0"trancount="2"lastbatchstarted="2016-01-08T12:03:58.737Hlastbatchcompleted=”2016・01-08T12:03:33.847”lastattention="2016-01-08T12:0
此文档下载收益归作者所有