如何检测READ_COMMITTED_SNAPSHOT是否启用?
在 Microsoft SQL Server 中,有没有办法通过 T-SQL 命令 ALTER DATABASE
?
我无法找到一种简单的方法来在 T-SQL 中或通过 Management Studio 的 GUI 来检测这一点。
In Microsoft SQL Server, is there a way to detect whether a database has had its isolation level set via the T-SQL command ALTER DATABASE <database> SET READ_COMMITTED_SNAPSHOT ON;
?
I cannot find a simple way to detect this in either T-SQL or via the Management Studio's GUI.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
返回值:
READ_COMMITTED_SNAPSHOT
选项为ON。 READ COMMITTED 隔离级别下的读操作基于快照扫描,并且不获取锁。READ_COMMITTED_SNAPSHOT
选项为关闭。READ COMMITTED
隔离级别下的读取操作使用 共享 (S) 锁。Return value:
READ_COMMITTED_SNAPSHOT
option is ON. Read operations under theREAD COMMITTED
isolation level are based on snapshot scans and do not acquire locks.READ_COMMITTED_SNAPSHOT
option is OFF. Read operations under theREAD COMMITTED
isolation level use Shared (S) locks.在 SQL2005 和 2012 上,
DBCC USEROPTIONS
都不显示is_read_comfilled_snapshot_on
:Neither on SQL2005 nor 2012 does
DBCC USEROPTIONS
showis_read_committed_snapshot_on
: