default concurrency control for sql server 2005

2019-03-01 06:13发布

问题:

what is the default concurrency control for SQL Server 2005? Is it optimistic concurrency control or pessimistic concurrency control? Can this be set?

Thanks in anticipation

回答1:

"Pessimistic" seems to be the default in 2005, although snapshot isolation can be activated if desired:

In the default pessimistic model, the first writer will block all subsequent writers, but using SI, subsequent writers could actually receive error messages and the application would need to resubmit the original request.

http://msdn.microsoft.com/en-us/library/cc917674.aspx