Table of ContentsPreviousNext

Ispirer
Please, note, that Ispirer SQLWays 6.0 is no longer supported and provided to clients.
You can try out automated conversion of databases and applications with Ispirer Toolkit for free. Download free trial.
Check out the relevant toolkit documentation.
Ispirer SQL Server to Oracle Migration overview.


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
BEGIN 
BEGIN 
  
BEGIN TRAN 
  
  
BEGIN TRANSACTION 
  
  
BEGIN TRANSACTION tran1 
SAVEPOINT tran1 
  
BEGIN TRANSACTION @val_tran1 
SAVEPOINT tran1 
If @val_tran1 equal 'tran1' 
BEGIN TRANSACTION @val_tran1  
WITH MARK 'transaction 1 
SAVEPOINT tran1 
If @val_tran1 equal 'tran1' 


Table of ContentsPreviousNext
Copyright 1999-2023 Ispirer Systems.
Ispirer and SQLWays are registered trademarks. All other product names may be trademarks of the respective companies.
All rights reserved.