输出日志 查日志
作者:互联网
DBCC TRACEON (1204, -1)
DBCC TRACEON (1222, -1)
SELECT cntr_value AS NumOfDeadLocks
FROM sys.dm_os_performance_counters
WHERE object_name = 'SQLServer:Locks'
AND counter_name = 'Number of Deadlocks/sec'
AND instance_name = '_Total'
Exec xp_readerrorlog 0
标签:输出,readerrorlog,name,日志,TRACEON,DBCC,1222 来源: https://www.cnblogs.com/liangyuwen/p/13390143.html