Transactions

  • Ron McCullough

    SSC Guru

    Points: 63877

    Comments posted to this topic are about the item Transactions

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • vk-kirov

    SSCertifiable

    Points: 7686

    Ref: Save Transaction - ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/b953c3f1-f96d-42f1-95a2-30e314292b35.htm

    Rollback Transaction - ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/6882c5bc-ff74-476a-984b-164aeb036c66.htm

    Some people don't have BOL2008 installed 🙂

    These links fit better:

    Save Transaction - http://msdn.microsoft.com/en-us/library/ms188378.aspx

    Rollback Transaction - http://msdn.microsoft.com/en-us/library/ms181299.aspx

  • jrhutch

    Say Hey Kid

    Points: 674

    Can't help but notice that we have 3 options: true, false and error. If we get an error the answer is still going to true or false. It's the very nature of true/false questions.

  • Cliff Jones

    SSChampion

    Points: 10517

    Good question, thanks.

  • jim.taylor

    SSC Veteran

    Points: 228

    good problem, but I think a better question might have been, what values are contained in the tmp table:

    1,a,b

    1,c,b

    empty or no rows

    error encountered

  • sknox

    SSChampion

    Points: 12284

    jrhutch (12/22/2009)


    Can't help but notice that we have 3 options: true, false and error. If we get an error the answer is still going to true or false. It's the very nature of true/false questions.

    Not exactly. If an error occurs but the transaction is not rolled back, it can be argued that the inserted row exists in an indeterminate state -- i.e, it exists as a probability waveform which will not collapse into a true/false value until the transaction is finalized either by handling the error and committing, or by rolling back the transaction completely.

    Ref. Schroedinger, Cat, et al.

    :hehe:

  • Michael Poppers

    SSCrazy

    Points: 2122

    Savepoints offer a mechanism to roll back portions of transactions. You create a savepoint using the SAVE TRANSACTION savepoint_name statement. Later, you execute a ROLLBACK TRANSACTION savepoint_name statement to roll back to the savepoint instead of rolling back to the start of the transaction

    I understood all that and still answered the QotD incorrectly (thinking that the ROLLBACK TRAN Sav1 had rolled the INSERT back)! Drat :-).

  • dgabele

    SSCarpal Tunnel

    Points: 4818

    Thanks! I was not familiar with SAVE TRANSACTION.

  • SQLRNNR

    SSC Guru

    Points: 281243

    Nice question Bitbucket.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • crashdan

    SSCommitted

    Points: 1960

    dgabele (12/22/2009)


    Thanks! I was not familiar with SAVE TRANSACTION.

    agreed i did not know about Save either

  • Peter Trast

    SSCarpal Tunnel

    Points: 4332

    It is always a GREAT question when something new (for me) is in it!

    Peter Trast
    Microsoft Certified ...(insert many literal strings here)
    Microsoft Design Architect with Alexander Open Systems

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

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