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 SCOTT.EMP (EMPNO, ENAME, JOB, MGR, HIREDATE) VALUES(61, 'Boo', 2, 1, '2013-06-20');
INSERT INTO SCOTT.EMP (EMPNO, ENAME, JOB, MGR, HIREDATE) VALUES(62, 'Hoo', 2, 1, '2013-07-01');
INSERT INTO SCOTT.EMP (EMPNO, ENAME, JOB, MGR, HIREDATE) VALUES(63, 'Zoo', 2, 1, '2013-07-04');
@set autocommit on;