|
Ispirer SQLWays Database Migration Software
BEGIN TRANSACTION Conversion from Microsoft SQL Server to Oracle
Microsoft SQL Server allows starting explicit or nested transactions using BEGIN TRANSACTION. COMMIT statements for such transaction decrease @@TRANCOUNT by 1 without making updates permanent. If a name is specified, Microsoft SQL Server application can rollback the transaction to its beginning or to a defined BEGIN TRANSACTION statement.
Explicit transactions are not supported in Oracle but Oracle can rollback a part of work. For this purpose use a SAVEPOINT statement. The SAVEPOINT statement allows identify a point in a transaction to which you can roll back later. After the SAVEPOINT statement has been created, you can continue processing, commit your work, rollback the entire transaction, or rollback to the SAVEPOINT.
Therefore, SQLWays emulates the Microsoft SQL Server BEGIN TRANSACTION statement for ROLLBACK using Oracle SAVEPOINT statement.
SQLWays changes BEGIN TRANSACTION statement with name to SAVEPOINT statement. BEGIN TRANSACTION statements without name are dropped.
Examples:
TABLE 48. BEGIN TRANSACTION Conversion from Microsoft SQL Server to Oracle Microsoft SQL Server Oracle Description