How programaticaly enable READ COMMITTED SNAPSHOT in SQL Server?

I recommend switching to single-user mode first. That ensures you're the only connection. Otherwise, the query might be suspended.

I recommend switching to single-user mode first. That ensures you're the only connection. Otherwise, the query might be suspended.

From: msdn.microsoft.com/en-us/library/ms17509... When setting the READ_COMMITTED_SNAPSHOT option, only the connection executing the ALTER DATABASE command is allowed in the database. There must be no other open connection in the database until ALTER DATABASE is complete. So, use this SQL: ALTER DATABASE SET SINGLE_USER WITH ROLLBACK IMMEDIATE; ALTER DATABASE SET READ_COMMITTED_SNAPSHOT ON; ALTER DATABASE SET MULTI_USER.

1 This was a freaking lifesaver. Thanks. – Kamikaze Mercenary Jan 11 at 19:26 @Kamikaze You're welcome!

– Bill Paetzke Jan 19 at 18:40.

Alter database dbname set read_committed_snapshot on with rollback after 20 seconds.

WITH ROLLBACK AFTER 20 SECONDS – Bill Paetzke May 6 '10 at 6:47 According MSDN: Specifies when to roll back incomplete transactions when the database is transitioned from one state to another. If the termination clause is omitted, the ALTER DATABASE statement waits indefinitely if there is any lock on the database. – João Vieira May 11 '10 at 13:27.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions