sp_who 'active'
sp_who2
exec itdb.dbo.WangFeng_CheckDeadLock
USE msdb
select * from sysjobhistory where run_status=0 order by run_date
select * from sysjobsteps where command like '%%'
select * from sysjobsteps where job_id=''
select * from sysjobs where job_id=''
select req_spid,object_name(rsc_objid),rsc_type,req_mode,*
from sys.syslockinfo
where object_name(rsc_objid) is not null
order by object_name(rsc_objid)
--======================================
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/607244/viewspace-765489/ ,如需转载,请注明出处,否则将追究法律责任。