Changing the Auto Commit Setting
Auto Commit means that each SQL statement successfully executed in an SQL Commander is committed automatically, permanently changing the database. This is the default for a connection, but you can change it at different levels.
Changing Auto-Commit for a Database Type
- Open Tools->Tool Properties,
- Select the Database tab,
- Expand the node for the database type, e.g. Oracle,
- Select the Transaction category,
- Uncheck the Auto Commit checkbox.
Changing Auto-Commit for a Connection
- Double-click the connection node in the Databases tab tree to open an Object View tab,
- Select the Properties tab,
- Select the Transaction category under the node for the database type, e.g. Oracle,
- Uncheck the Auto Commit checkbox.
Changing Auto-Commit for an SQL Commander tab
- Use the SQL Commander->Transaction->Turn On/Off Auto Commit toggle item, or,
- Use the corresponding toggle button to the right in the SQL Commander toolbar.
Changing Auto-Commit for a Statement Block
You can use the @set autocommit
command in a script to enable or disable auto commit for different blocks:
@set autocommit off;
insert into SAKILA.FILM (FILM_ID, LANGUAGE_ID, TITLE) values(1201, 1, 'Mission: Impossible - DbVisualizer');
insert into SAKILA.FILM (FILM_ID, LANGUAGE_ID, TITLE) values(1202, 1, 'Harry Potter and the DbVisualizer');
insert into SAKILA.FILM (FILM_ID, LANGUAGE_ID, TITLE) values(1203, 1, 'DbVisualizer: Episode 12');
@set autocommit on;