Informix® and Sybase
ASE handle transactions in a similar manner.
Informix native mode
(non ANSI):
- Transactions are started with "BEGIN WORK".
- Transactions are validated with "COMMIT WORK".
- Transactions are canceled with "ROLLBACK WORK".
- Statements executed outside of a transaction are automatically
committed.
- DDL statements can be executed (and canceled) in transactions.
Sybase ASE:
- Sybases supports two transaction modes:
- The SQL standards-compatible mode, called chained mode,
to get implicit transaction.
- The default mode, called unchained mode, where transactions
have to be started/ended explicitly.
- Transactions are started with "BEGIN TRANSACTION [name]".
- Transactions are validated with "COMMIT TRANSACTION [name]".
- Transactions are canceled with "ROLLBACK TRANSACTION [name]".
- Transactions save points can be placed with "SAVEPOINT [name]".
- Sybase ASE supports named and nested transactions.
- DDL statements can be executed in transactions blocks when the
'ddl in tran' option is set to true with:
master..sp_dboption dbname, 'ddl in tran', true
go
checkpoint
go
Solution
Informix transaction
handling commands are automatically converted to Sybase ASE instructions
to start, commit or rollback transactions.
Make sure that the
database uses the default unchained mode (set chained off)
and allows DDLs in transactions ('ddl in tran' option is true).
Regarding
the transaction control instructions, the BDL applications do not
have to be modified in order to work with Sybase ASE.