SQL Server Transaction Savepoints

added by BlackWasp
4/23/2012 9:58:05 AM


Sometimes Transact-SQL (T-SQL) scripts require the ability to roll back some parts of a transaction whilst allowing other elements of a process to be committed to the database normally. This can be achieved with the use of transaction savepoints.


4/23/2012 10:00:53 AM
For processes that can complete partially, or that have individual steps, it's handy to save off the current transaction state before running the next stored procedure in line. If a rollback needs to occur, the completed steps can still be committed if it's safe to do so. Then the user can be alerted to the problem and the process can pick up where it left off later.

4/24/2012 7:20:37 AM
Good point.