-- 设置为单用户
ALTER DATABASE AlliantDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
GO
-- 开启行版本(事务级)
ALTER DATABASE AlliantDB SET ALLOW_SNAPSHOT_ISOLATION ON;
GO
-- 开启语句级行版本
ALTER DATABASE AlliantDB SET READ_COMMITTED_SNAPSHOT ON WITH no_wait
GO
-- 设置为多用户
ALTER DATABASE AlliantDB SET MULTI_USER WITH ROLLBACK IMMEDIATE;
GO