--修改sqlserver 数据库隔离级别
--开启read_committed_snapshot 读快照隔离级别,推荐值是1:
--可以解决sqlserver大多数无脑死锁现象
select name,is_read_committed_snapshot_on from sys.databases where name = 'kingdee_prod'
use master
declare @dbname as sysname
declare @sql varchar(max)
set @dbname='kingdee_prod'
set @sql=''
select @sql=@sql+' kill '+cast(spid as varchar)+';' from master..sysprocesses where dbid=db_id(@dbname);
set @sql=@sql+'alter database '+@dbname+' set read_committed_snapshot on ' ;
exec(@sql);
标签:set,快照,read,sql,snapshot,committed,dbname From: https://www.cnblogs.com/walkersss/p/17703333.html