how to trace the error log

Executed as user: WTC\Ebw.Admin. Transaction (Process ID 95) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. [SQLSTATE 40001] (Error 1205).  The step failed.

这是说明job执行的时候产生了死锁,我们可以使用DBCC TRACEON(1222,-1)命令来抓取死锁信息,死锁每次发生,会记录到ERROR LOG中,ERROR LOG文件存放在.. MSSQL11.MSSQLSERVER\MSSQL\Log 该目录下。 

关闭该跟踪标记,可执行DBCC TRACEOFF(1222,-1)

posted @ 2014-09-02 11:24  Jason.Bird  阅读(136)  评论(0编辑  收藏  举报