24
22

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SQLServerで読み取り一貫性

Last updated at Posted at 2014-04-22

SQLServerで排他ロックにブロックされずにデータを参照するには、
READ COMMITTED SNAPSHOTを設定すると楽であります。
以下、設定方法。

1.現在の設定を確認

dbcc useroptions;

以下のようになってるかと思います。

名称未設定-3.gif

2.READ_COMMITTED_SNAPSHOT をONにする

ALTER DATABASE 'DB名'
SET READ_COMMITTED_SNAPSHOT ON;

'強制的に実行する時以下のオプションを付ける'
WITH ROLLBACK IMMEDIATE;

3.再度設定を確認

dbcc useroptions;

以下のようになればOKです。

名称未設定-4.gif

参考及び詳細: SQL Server 2005 Tips and Tips

24
22
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
24
22

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?