|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:52 AM
Points: 1,277,
Visits: 1,608
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 11:21 AM
Points: 2,163,
Visits: 2,148
|
|
| Thanks for the question, it is good to review the basics of transactions!
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Friday, May 17, 2013 2:53 AM
Points: 1,527,
Visits: 359
|
|
thanks for this question... i was wondering if you could you provide a question or a query that involves both ROLLBACK WORK & ROLLBACK TRAN
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 2:31 AM
Points: 5,235,
Visits: 7,033
|
|
ziangij (9/20/2010)
thanks for this question... i was wondering if you could you provide a question or a query that involves both ROLLBACK WORK & ROLLBACK TRAN  ROLLBACK WORK (or simply ROLLBACK, as the WORK keyword is optional) is completely equivalent to ROLLBACK TRAN without transaction name.
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:52 AM
Points: 1,277,
Visits: 1,608
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 1:30 AM
Points: 1,060,
Visits: 4,166
|
|
| Thanks for this. I wouldn't have realised that ROLLBACK would roll back a comitted transaction - doesn't this have ACID implications?
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 2:31 AM
Points: 5,235,
Visits: 7,033
|
|
jts_2003 (9/21/2010) Thanks for this. I wouldn't have realised that ROLLBACK would roll back a comitted transaction - doesn't this have ACID implications? It would be far worse if the inner transaction were not rolled back. The inner transaction is included in the outer transaction, so a ROLLBACK of the outer transaction should roll back everything that has been done by that transaction - including the nested transactions.
See also the forum discussions that followed the previous two questions in this series.
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Yesterday @ 9:06 AM
Points: 9,367,
Visits: 6,465
|
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Thursday, March 28, 2013 12:06 AM
Points: 1,524,
Visits: 207
|
|
In regards to SSChasing Mays concerns about committed transactions being rolled out, 'Committing inner transactions is ignored by the SQL Server Database Engine' (http://msdn.microsoft.com/en-us/library/ms189336.aspx).
Real committed transactions can't be rolled out ('A transaction cannot be rolled back after a COMMIT TRANSACTION statement is executed.' (http://msdn.microsoft.com/en-us/library/ms181299.aspx)).
Perhaps the related QotD answer explanation element ('... (including those inner transactions that have been committed)') could have been better worded.
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 9:51 AM
Points: 2,862,
Visits: 2,465
|
|
Good question - and a great way to review the basics.
Steve Jimmo Sr DBA “If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan
|
|
|
|