2012年7月27日
摘要: --检测死锁--如果发生死锁了,我们怎么去检测具体发生死锁的是哪条SQL语句或存储过程?--这时我们可以使用以下存储过程来检测,就可以查出引起死锁的进程和SQL语句。SQL Server自带的系统存储过程sp_who和sp_lock也可以用来查找阻塞和死锁, 但没有这里介绍的方法好用。 use mastergocreate procedure sp_who_lockasbegindeclare @spid int,@bl int, @intTransactionCountOnEntry int, @intRowcount int, @intCountProp... 阅读全文
posted @ 2012-07-27 15:26 无敌百搭 阅读(5192) 评论(0) 推荐(2) 编辑