read-committed-snapshot

How to detect READ_COMMITTED_SNAPSHOT is enabled?

Hello, In MS 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. TIA ...

How long should SET READ_COMMITTED_SNAPSHOT ON take?

How long should it take to run ALTER Database [mysite] SET READ_COMMITTED_SNAPSHOT ON I just ran it and its takin 10 minutes. How can I check if it is applied? ...

How programaticaly enable READ COMMITTED SNAPSHOT in SQL Server?

I need to programaticaly enable READ COMMITED SNAPSHOT in SQL Server. How can I do that? ...

Tuning SQL Server 2008 for web applications

In one of the Stackoverflow podcasts, I remember Jeff Atwood saying that there was a configuration option in SQL Server 2008 which cuts down on locking, and was kind of an alternative to using "with (nolock)" in all your queries. Does anybody know how to enable the feature he was talking about, possibly even Jeff himself. I'm looking a...

Why is READ_COMMITTED_SNAPSHOT not on by default?

Simple question? Why is READ_COMMITTED_SNAPSHOT not on by default? I'm guessing either backwards compatibility, performance, or both? [Edit] Note that I'm interested in the effect relating to the READ_COMMITTED isolation level, and not the snapshot isolation level. Why would this be a breaking-change, as it holds less locks, and stil...

SELECT FOR UPDATE with SQL Server

I'm using a Microsoft SQL Server 2005 database with isolation level READ_COMMITTED and READ_COMMITTED_SNAPSHOT=ON. Now I want to use: SELECT * FROM <tablename> FOR UPDATE ...so that other database connections block when trying to access the same row "FOR UPDATE". I tried: SELECT * FROM <tablename> WITH (updlock) WHERE id=1 ...bu...

msdtc and isolation level

Hi, I need some clarification how MS-DTC will behave in scenario given below 1) I have more than one connection in within a transactionscope (Isolation level - ReadCommited),which will bring MS- DTC into action now : a) Will MS-DTC automatically change isolation level to SERIALIZABLE. b) (Imp) If above answer is yes and I have imple...

READ_COMMITTED_SNAPSHOT on SQL Server 2005 in 2000 Compatability Mode?

Hello, While investigating a problem I believed to be related to lock escalation and thinking that READ_COMMITTED_SNAPSHOT would be the solution, I checked whether it was already enabled. To my surprise, the database had compatibility level 80 (SQL Server 2000, and I'm new here, and nobody or document seems to know why!). But READ_COM...

SQL Azure and READ_COMMITTED_SNAPSHOT

I would like to set READ_COMMITTED_SNAPSHOT to ON on my SQL Azure database, but the following code, which works with other versions of SQL Server, is not supported in Azure: ALTER DATABASE [database_name] SET READ_COMMITTED_SNAPSHOT ON GO First question: Is it still a good idea to set READ_COMMITTED_SNAPSHOT to ON in SQL Azure (or wha...

Do DB locks require transactions?

Is it true that "Every statement (select/insert/delete/update) has an isolation level regardless of transactions"? I have a scenario in which I have set update of statements inside a transaction (ReadCommitted). And another set not in a transaction (select statements). In this case when first set is executing another waits. If I set R...

Read committed Snapshot VS Snapshot Isolation Level

Could some one please help me understand when to use SNAPSHOT isolation level over READ COMMITTED SNAPSHOT in SQL Server? I understand that in most cases READ COMMITTED SNAPSHOT works, but not sure when go for SNAPSHOT isolation. Thanks ...

How to figure the read/write ratio in Sql Server?

How can I query the read/write ratio in Sql Server 2005? Are there any caveats I should be aware of? Perhaps it can be found in a DMV query, a standard report, a custom report (i.e the Performance Dashboard), or examining a Sql Profiler trace. I'm not sure exactly. Why do I care? I'm taking time to improve the performance of my web a...

Is READ UNCOMMITTED / NOLOCK safe in this situation?

I know that snapshot isolation would fix this problem, but I'm wondering if NOLOCK is safe in this specific case so that I can avoid the overhead. I have a table that looks something like this: drop table Data create table Data ( Id BIGINT NOT NULL, Date BIGINT NOT NULL, Value BIGINT, constraint Cx primary key (Date, I...

Application safe to use READ_COMMITTED_SNAPSHOT?

I have a large web application using a COM data access layer against an SQL Server 2005 database. By default, the isolation level is READ_COMMITTED. Now I understand how READ_COMMITTED_SNAPSHOT isolation level works, and reading MSDN it says you can turn it on transparently. However, I'm still sceptical. :) Is it guaranteed, in an implem...