Results 1 to 5 of 5

Thread: Inheritence of Set Transaction Isolation Level?

  1. #1
    Join Date
    Mar 2004
    Posts
    5

    Inheritence of Set Transaction Isolation Level?

    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

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    Hmmm..

    I think it would, did you test it?

  3. #3
    Join Date
    Mar 2004
    Posts
    5
    Thank you for your reply but if I knew how to test it, I wouldn't have needed to post for help. If you know a definitive method to test this, I'm all ears.
    Jeff Moden

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    create two procedures in pubs database,
    sp1 as
    select * from authors
    exec sp2

    sp2 as
    select * from titles

    In Query analyzer, start a new windows and run this

    begin tran
    update authors set au_fname='Test'

    update titles set titlename='test title'

    in second query analyzer window run

    Set Transaction Isolation Level READ UNCOMMITTED

    exec sp1

    if you get results from both tables the isolation level is inherited, if you get results from authors only and it is blocked then it is not inherited.

  5. #5
    Join Date
    Mar 2004
    Posts
    5

    Thank you

    Thank you for your time... I'll give it a try.
    Jeff Moden

Posting Permissions

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