>>---EXEC SQL-SAVEPOINT-name----> >--.-----------------------------------------------------------.---END-EXEC--->< +--ON ROLLBACK RETAIN CURSORS--.----------------------------+ +--ON ROLLBACK RETAIN LOCKS--+ >>---EXEC SQL-SAVE-.-TRANSACTION--.--name-- END-EXEC--->< +-TRAN---------+
Because SQL Server does not allow save points with fire hose cursors, the following restrictions apply:
EXEC SQL SAVEPOINT SP1 END-EXEC EXEC SQL SAVEPOINT PHASE2 ON ROLLBACK RETAIN CURSORS END-EXEC
Comments:
You can define multiple save points for a single transaction.
When you set a save point using a unique name, and subsequently set another save point using the same unique name, the named save point is reset to the current transaction state.
The behavior of cursors and locks after a rollback to a save point is database-specific. For details, see the documentation provided by your database vendor.