设定跟踪1204:
Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ USE MASTER DBCC TRACEON (1204,-1)
显示当前启用的所有跟踪标记的状态:
Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ DBCC TRACESTATUS(-1)
取消跟踪1204:
Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ DBCC TRACEOFF (1204,-1)
在设定跟踪1204后,会在数据库的日志文件里显示SQL Server数据库死锁时一些信息。但那些信息很难看懂,需要对照SQL Server联机丛书仔细来看。根据PAG锁要找到相关数据库表的方法:
Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ DBCC TRACEON (3604) DBCC PAGE (db_id,file_id,page_no) DBCC TRACEOFF (3604
评论加载中…
![]() |