Microsoft SQL Server 2005 中的默认隔离级别 [英] Default isolation level in Microsoft SQL Server 2005

查看:37
本文介绍了Microsoft SQL Server 2005 中的默认隔离级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQL Server 2005 中的默认隔离级别是什么?您希望在哪种情况下更改它?关于默认隔离级别的一些解释将不胜感激.

What is the default isolation level in SQL Server 2005 and in which scenario would you want to change it ? And little explanation about the default isolation level would be appreciated.

期待中的感谢

推荐答案

Default = READ COMMITTED

Default = READ COMMITTED

您不需要经常更改它.有些人建议总是使用 READ UNCOMMITTED",但这很危险.

You don't need to change it often. Some folk recommend "always use READ UNCOMMITTED" but this is dangerous.

至于为什么,我建议维基百科但在总结 可能会发生 3 个数据读取问题:

As to why, I'd suggest Wikipedia but in summary there are 3 data read issues that can occur:

  1. 脏读
  2. 不可重复读取
  3. 幻读

当您以降低并发为代价增加隔离(到 SERIALIZABLE)时,所有这些都会被删除.

Each of these is removed as you increase isolation (to SERIALIZABLE) at the cost of reduced concurrency.

默认级别可以防止脏读",坦率地说已经足够了.

The default level prevents "Dirty reads" and frankly is good enough.

这篇关于Microsoft SQL Server 2005 中的默认隔离级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆