Dirty Read

November 1, 2007 09:09 by WebStoryMaker

참고: http://en.wikipedia.org/wiki/Dirty_Read

Write-Read Conflict 라고도 불리우는 Dirty Read 란, 두 Transaction 중에 하나의 Transaction이 데이터를 수정하고 Commit 하지 않은 상태에서 다른 Transaction 이 동일한 데이터를 수정(Update)하고 Commit 하여 수정 중에 있는 데이터가 다른 Transaction 에 의해 수정이 되는 inconsistent(일관되지 못한) 상태를 말한다.

이러한 Dirty Read 를 막기 위해서 데이터베이스의 Isolation level 을 지정해 줄 필요가 있다.

DirtyRead 를 막기 위해서 Isolation Level 을 read commited 로 지정할 수 있다.

.NET 에서의 예제)

SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["AW"].ToString());
        cn.Open();
        SqlTransaction transaction = cn.BeginTransaction(IsolationLevel.ReadCommitted);

image

 

그 외의 Isolation Level 은 다음을 참고
Set Transaction Isolation Level from MSDN2
Isolation Level from Wikipedia


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

November 20. 2008 13:37