SET TRANSACTION ISOLATION LEVEL SNAPSHOT

  • Hi All,

    Is it adviceable to SET TRANSACTION ISOLATION LEVEL SNAPSHOT in the calling SP.

    Create SP1

    AS

    SET TRANSACTION ISOLATION LEVEL SNAPSHOT

    .......................

    ......................

    ....................

    EXECUTE SP2

    ..............

    ...............

    CREATE SP2

    AS

    .................

    .................

    ....................

    Thanks for the advice

  • Switching from any isolation level to snapshot isolation level rollback any open transaction, so it's best to set it before opening a transaction.

    Now, snapshot isolation can generate a lot of IO in tempdb, so it's best to set it only when realy needed and not too long before.

    In your case it all depend on where it's needed and if there are transactions open or not.

  • Thanks Grasshopper for the reply.

    but my question is is it advicerble to set the SET TRANSACTION ISOLATION LEVEL SNAPSHOT in the calling SP ?

  • Oliiii (9/17/2010)


    In your case it all depend on where it's needed and if there are transactions open or not.

    In other word, it depend on the procedures...

    If you only need snapshot isolation level in SP2 and no open transaction wrap the SP2 call in SP1, then no, don't set it in the calling procedure.

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

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