SQL Server开启READ_COMMITTED_SNAPSHOT

设置数据库为SINGLE_USER模式,减少锁定时间
ALTER DATABASE dbname SET SINGLE_USER WITH ROLLBACK IMMEDIATE
ALTER DATABASE dbname SET ALLOW_SNAPSHOT_ISOLATION ON
ALTER DATABASE dbname SET READ_COMMITTED_SNAPSHOT ON
ALTER DATABASE dbname SET MULTI_USER
开启之后一天了没有看到死锁的记录,还是有点作用的!
posted @ 2016-11-25 12:05  放哨De老鼠  阅读(10025)  评论(0编辑  收藏  举报