When filling tables with lots of data it is sometimes helpful to switch of the transactional logging to avoid exploding Transaction-Log-Files (like this is done when doing a DB-Load).
On DB2 this is done with the command
Code:
alter table <tablename> activate not logged initially
. The transaction log will be switched off for the current transaction, so normally until the next commit or rollback.
When doing this with SQuirreL or SQL Workbench this works fine. I send something like
Code:
alter table <tablename> activate not logged initially;
insert into <tablename> (select * from <somewhere>);
commit;
And while the
'Insert into' runs I check the utilization of the transaction log with
Code:
select * from SYSIBMADM.LOG_UTILIZATION
and see, that this stands below 1%.
Doing the same in a Kettle ‘Execute SQL’-Step (either in a Job or a Transformation) let the utilization rise up permanently while the
‘insert into’ runs.:confused:
Here my test job
autocommit_test.kjb
I already tried to set up the connection with Connection Pooling and set ‘defaultAutoCommit=false’. I tried to set the parameter ‘AutoCommit=false’ in the Option panel which throws errors when Connection Pooling is not enabled but has no effect.
In the JDBC-Trace (traceLevel=35) I see several setAutoCommit()-calls and each setAutoCommit(false) is followed by a setAutoCommit(true)-call . Regardless the above settings…
Looking at a JDBC-Trace of SQL Workbench (with AutoCommit-Switch off ) there is only one setAutoCommit(false) call at the beginning.
pdiTrace_jdbc.v3.txt
The JDBC-Driver are both the same for Kettle and SQL Workbench and it does not matter whether JDBC-Level 3 or 4 Driver is used.
What am I doing wrong or is this a bug in Kettle?
Are there any other options to switch autocommit off?