Transactions

  • 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]

  • 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

  • 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.

  • Good question, thanks.

  • 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

  • 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:

  • 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 :-).

  • Thanks! I was not familiar with SAVE TRANSACTION.

  • 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

  • dgabele (12/22/2009)


    Thanks! I was not familiar with SAVE TRANSACTION.

    agreed i did not know about Save either

  • 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 10 (of 10 total)

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