SET TRANSACTION ISOLATION LEVEL Inheritence

  • Greetings,
     
    I have a "main" stored procedure that executes other stored procedures and it looks something like this...
     
    Set Transaction Isolation Level READ UNCOMMITTED
    .
    .
    .
    EXEC (storedproc1)
    EXEC (storedproc2)
    EXEC (storedproc3)
    .
    .
    .
    Return

    My question is:  Will the EXEC'd stored procedures run as if the Transaction Isolation Level had been explicitly set within those stored procedures?  In other words, do the EXEC'd stored procedures inherit the Transaction Isolation Level of the "main" stored procedure?

    Thank you for your time...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I believe the answer is yes.

    "Set Transaction Isolation Level READ UNCOMMITTED"

    Above sets the transaction isolation level for the entire user session.

    So it seems to me that when it encounters this within your stored procedure, that it would override/replaces your current isolation level for the session.

    GaryA

  • Kind'a what I thought... Thanks for the quick reply, Gary!

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

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

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