Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2006
    Posts
    1

    Unanswered: SQLServer interview quiz

    I was on an interview and one developer asked me:
    Suppose three transactions have three different isolation levels, one of them has isolation level
    serializable, and all of then hit one table. How will SQLServer handle this?

    He said that SQLServer automatically set isolation level for all transactions to serializable.

    Is it true?
    Thanks Nick

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    I believe the default for sql 2k is read committed. For 2005 there is something about a snapshot option for read committed. I am still learning the new stuff.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217

    Not 100% correct

    I don't think he is 100% correct.
    I think it is the case ONLY if the serializable process hits it first.

    If one of the other 2 processes hits first, then the serializable process will certainly have to wait to read/write, but the other process will still be able to read the table (although it won't be able to write to the same rows).

    Am I correct ?

  4. #4
    Join Date
    Jul 2003
    Location
    Australia
    Posts
    217
    Was I correct ?

  5. #5
    Join Date
    Aug 2004
    Location
    Pune,India
    Posts
    94
    exactly. I agree with you.
    There is no other way for SQL Server to know what is coming in next for transaction and logically it should put whatever transaction lock is requested first.
    In GOD we believe. Everything else we Test!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •