中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

阻塞者及阻塞數量

發布時間:2020-07-21 13:49:10 來源:網絡 閱讀:189 作者:Kassadar 欄目:關系型數據庫
With T
As
(
Select ROW_NUMBER() over (order by spid) as id, spid,blocked From (select distinct spid,blocked from sys.sysprocesses where spid in
    (Select blocked from sys.sysprocesses where blocked <>0) and blocked=0) S
Union All
Select  id,TB.spid,TB.blocked  From sys.sysprocesses TB Inner Join T on TB.blocked=T.SPID  AND TB.blocked<>TB.spid
),
U
AS
(select distinct a.spid,last_batch,program_name,nt_username,loginame,db_name(a.dbid) as 'dbname',OBJECT_NAME(resource_associated_entity_id,a.dbid) as 'tablename',request_mode,request_type,open_tran,waittype,status,hostname,cmd,b.text as TSQL
from sys.sysprocesses a 
cross apply sys.dm_exec_sql_text(a.sql_handle) b 
inner join sys.dm_tran_locks c on a.spid=c.request_session_id and resource_type='OBJECT' and request_mode not like 'Sch%'
where spid in
    (Select blocked from sys.sysprocesses where blocked <>0) 
    and a.blocked=0
)
select U.spid,blockeds,last_batch,program_name,nt_username,loginame,dbname,tablename,request_mode,request_type,open_tran,waittype,status,hostname,cmd,tsql from U inner join (Select distinct COUNT(id) over (partition by id)-1 as blockeds,C.spid From T A cross apply (select TOP 1 SPID from T B WHERE A.id=B.id AND B.blocked=0)C) BlKS ON U.spid=BLKS.spid;
![](https://cache.yisu.com/upload/information/20200311/41/171157.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)
向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

淄博市| 宁晋县| 惠东县| 扶风县| 寿光市| 七台河市| 赫章县| 沂水县| 清水河县| 柘城县| 故城县| 互助| 团风县| 澳门| 芜湖县| 甘肃省| 余江县| 临清市| 吉首市| 灵寿县| 新宾| 互助| 桐乡市| 长汀县| 全州县| 古丈县| 宁阳县| 兴义市| 沅陵县| 襄垣县| 彝良县| 若尔盖县| 贵港市| 霍林郭勒市| 班戈县| 南投市| 武宣县| 长治县| 余干县| 中超| 沧州市|