I have SQL Server 2008 and I want to do this transaction:
begin transaction oo;
......
begin try
save transaction xx;
alter table ....;
alter table ....;
alter table ....;
end try
begin catch
rollback transaction xx;
end catch;
......
commit transaction oo;
In rollback transaction xx;
, I get a message
3931 The current transaction could not be committed and could not be returned to the save point. Rollback the entire transaction.
What am I doing wrong here?
Refresh . To explain the scenario:
There is a big transaction "oo" that will change the structure of the database tables from product version X to product version Y.
In nested transactions, user tables must be checked for changes (= internal transaction).
If some some damaged user table is incorrect, the whole product update process should not be rolled back.
, , , , - ( ).