February 8, 2012 at 10:15 am
David Burrows (2/8/2012)
GilaMonster (2/6/2012)
Given the distribution of answers, I'm considering a followup question - "does recovery model ever affect the ability to rollback transactions?" because it appears way too many people don't understand what recovery models do.Or maybe create MotD (Myth of the Day) 😀
They seem to pop up on their own, without anyone really trying.
February 9, 2012 at 2:36 am
GilaMonster (2/6/2012)
Is it bad form, if you create a QotD, to list your own article as a reference?
depends who does it. It won't be bad form if you do it.
Tom
February 11, 2012 at 7:15 am
Good question. I missed it but learned something.
http://brittcluff.blogspot.com/
February 17, 2012 at 8:01 am
Good question ... thanks!
March 31, 2012 at 2:27 pm
Nice to test and show answer as absolute.
Jamie
August 2, 2012 at 7:07 am
Nice & e@zy
October 11, 2012 at 1:39 am
Ahhh... 🙁
I thought Recovery mode has effect while rolling back the transaction.
well new thing to learn today...
Can any give an example of this?
_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
October 11, 2012 at 2:02 am
Recovery model has no effect ever on rolling back a transaction.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 11, 2012 at 3:45 am
kapil190588 (10/11/2012)
Can any give an example of this?
Yesterday, when you asked for resources to learrn about SQL Server, one of the suggestions I gave (the first, to be precise) is to make sure you have an instance of SQL Server that you can use to play around with. Now is the time to use that instance.
It is really very easy to create this example yourself. Just create a table, put in a few rows of data, then start a transaction, truncate the table, rollback the transaction and then check the contents of the table.
That example is so basic, that just typing and posting the code would probably have taken me less time than it took me to write this message. But I hope this message has the higher educational value.
January 11, 2013 at 2:50 am
Since I worked only in 2005 & above i think got it correct. I don't have idea about earlier versions.
As far as I know anything written between
BEGIN TRAN
.
.
.
ROLLBACK
can be rolled back.
Please correct me if i'm wrong.
--
Dineshbabu
Desire to learn new things..
January 11, 2013 at 11:42 am
Inserts into a table variable aren't rolled back. "SELECT NEXT VALUE FOR <sequence>" isn't rolled back either. I'm not aware of anything else that isn't but there's likely a small number that aren't.
January 11, 2013 at 2:09 pm
Not just inserts into a table variable, all modifications to table variables are retained after a rollback.
Other things that are not rolled back are assignments to scalar variables, identity values that were givven out are not given out again (so you can get gaps in the identity sequence), and you can still observe the effects of a rolled back transaction in most dynamic management views.
On a more technical side, modifications written to the transaction log are not removed on a rollback (there is in fact an extra entry added, to log the rollback event). And I think (but have not tested) that an autogrow of the database file that takes place because of a huge insert that is rolled back will not be undone.
January 12, 2013 at 12:59 am
Page splits don't roll back.
Also, while table variables ignore user transaction rollbacks, statements will still automatically roll back in the case of an error
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 16, 2013 at 11:37 pm
Thanks cfradenburg, Hugo & GilaMonster.
I will take the TSQL part, Changes made to Table variables and Scalar variables will not be affected by Rollback. As well as Identity value will not be re-seeded.
--
Dineshbabu
Desire to learn new things..
Viewing 14 posts - 46 through 58 (of 58 total)
You must be logged in to reply to this topic. Login to reply