December 22, 2009 at 12:06 am
Comments posted to this topic are about the item Transactions
December 22, 2009 at 12:57 am
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
December 22, 2009 at 7:39 am
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.
December 22, 2009 at 8:03 am
Good question, thanks.
December 22, 2009 at 8:55 am
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
December 22, 2009 at 9:03 am
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:
December 22, 2009 at 9:03 am
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 :-).
December 22, 2009 at 9:47 am
Thanks! I was not familiar with SAVE TRANSACTION.
December 22, 2009 at 9:52 am
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
December 22, 2009 at 1:19 pm
dgabele (12/22/2009)
Thanks! I was not familiar with SAVE TRANSACTION.
agreed i did not know about Save either
March 19, 2010 at 5:46 pm
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
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy