IsolationLevel in Transaction (Suggestion Required)

  • Hi Guys,

    I need a suugestion on isolation level in a transaction.

    I am having a transaction which reads max value of a column(not a primary key) of a table and then performs some

    some operations and inserts data in the same table.In the operations the column value of which we are fecthing the max value gets incremented .For example if initially the max value was 1 ,after the operations we insert 10-20 new rows and now our max value for the column will be 11 or 21.

    All this process is under one transaction.I am confused with what isolation level should i select for my transaction .

    I do not want two transactions to read the same max value of the column and then insert the same updated value in the column.

    Please help.

  • Hi there,

    There is a good article on isolation levels by SQL Server CAT here:

    http://blogs.msdn.com/b/sqlcat/archive/2011/02/20/concurrency-series-basics-of-transaction-isolation-levels.aspx

    ============================================================
    David

    http://www.sqlservercentral.com/articles/Best+Practices/61537/[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply