cmmrfrds,
First of all, Oracle implicitly begins a new transaction after the following events:[ul][li]New connection to Oracle[/li][li]execution of a COMMIT or a ROLLBACK statement[/li][/ul]Additionally, an implicit COMMIT occurs following the successful completion of these commands:[ul][li]
Data-Definition Language (DDL): CREATE, ALTER, DROP, OR TRUNCATE.[/li][li]
Data-Control Language (DCL): GRANT or REVOKE.[/li][/ul]
So, one way to ensure that you have begun a new transaction is to explicitly issue a COMMIT (or a ROLLBACK) statement.
If you have executed a series of
Data-Manipulation Language (DML) statements only (e.g. SELECT, INSERT, UPDATE, DELETE, MERGE), then, by definition, the changes have been neither COMMITted or ROLLedBACK. Once you have made all of the DML changes that constitute moving the business from one valid state to yet another valid state, then you should issue a COMMIT (or ROLLBACK) command.
To conditionally execute code (e.g. "Decision to Commit or rollback code"), we typically use PL/SQL to surround the conditional statements (and an accompanying COMMIT or ROLLBACK).
Let us know if you have additional questions.
![[santa] [santa] [santa]](/data/assets/smilies/santa.gif)
Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services:
www.dasages.com]