473,385 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Implicit Commit On DB2-Transaction On Termination Of Process

Hi there,

we have the following problem using a DB2 version 7 on z/OS, referring
also <a
href="http://groups.google.de/group/comp.databases.ibm-db2/browse_thread/thread/2555018c0d364314/ea946c98e25ce4b7?lnk=gst&q=assmann&rnum=2#ea946c98 e25ce4b7">this
thread</a>:

Using a java program with a connection to a DB2 using a type 2-driver,
we insert many datasets into the database in one transaction. The type
2-driver connects to the database using RRSAF. If the program will be
killed (e.g. by using a kill -9 command), the program itself terminats
- but the transaction will be committed. Important is, that the program
did not send any commit command using the jdbc-connection (which cannot
be done by the program because it was killed toughly so the code
sending a rollback or commit will not be reached).

If we use a type 4-driver (which does not connect to the database using
RRSAF), everything works well. The connection will be closed doing a
rollback before. Unfortunately, it is necessary for us to use a type
2-driver, the explanation of this should not be part of this thread and
should not be discussed.

Does anyone has an idea how to solve this problem, doing a implicit
rollback closing a connection? Is there a parameter on the DB2 using
RRSAF where could be set that the database has to do a rollback while
closing a connection? A commit should only be done if the program
explicitly sends the commit-command, not at any time an implicit
commit.

We are looking forward to hearing from you soon.

Best regards,
Ralf

Nov 13 '06 #1
3 3726

Is there noone having an idea how to solve this problem?

Ralf

Nov 21 '06 #2
Ralf Assmann wrote:
Hi there,

we have the following problem using a DB2 version 7 on z/OS, referring
also <a
href="http://groups.google.de/group/comp.databases.ibm-db2/browse_thread/thread/2555018c0d364314/ea946c98e25ce4b7?lnk=gst&q=assmann&rnum=2#ea946c98 e25ce4b7">this
thread</a>:

Using a java program with a connection to a DB2 using a type 2-driver,
we insert many datasets into the database in one transaction. The type
2-driver connects to the database using RRSAF. If the program will be
killed (e.g. by using a kill -9 command), the program itself terminats
- but the transaction will be committed. Important is, that the program
did not send any commit command using the jdbc-connection (which cannot
be done by the program because it was killed toughly so the code
sending a rollback or commit will not be reached).

If we use a type 4-driver (which does not connect to the database using
RRSAF), everything works well. The connection will be closed doing a
rollback before. Unfortunately, it is necessary for us to use a type
2-driver, the explanation of this should not be part of this thread and
should not be discussed.

Does anyone has an idea how to solve this problem, doing a implicit
rollback closing a connection? Is there a parameter on the DB2 using
RRSAF where could be set that the database has to do a rollback while
closing a connection? A commit should only be done if the program
explicitly sends the commit-command, not at any time an implicit
commit.
As far as I know, that's working as designed - by the Java folks. They want
to have an implicit commit at application termination/connection close.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Nov 21 '06 #3


On Nov 21, 6:07 am, Knut Stolze <sto...@de.ibm.comwrote:
Ralf Assmann wrote:
As far as I know, that's working as designed - by the Java folks. They want
to have an implicit commit at application termination/connection close.
No, it's not the Java folks, because the same Java folks made the
type-4
driver which works differently. Killing the client absolves it of any
ability
or responsibility to change the subsequent reaction of the DBMS. I
think there must be an option with the RRSAF protocol which by default
deems that a lost connection means commit, and that if the type-2
driver
is written well, there may be a connection property you can set to
alter
this behavior. The type-2 driver is broken if it is as you say. If the
client
is killed when it has done half it's intended transaction, you do *not*
want
the DBMS doing a heuristic commit.

Joe Weinstein at BEA Systems

Nov 21 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JC | last post by:
I have surprising performance results running a simple Java program which inserts 1000 rows into the following simple table: create table TestTable (id int not null, comments varchar(255) not...
0
by: janet | last post by:
HI, Philip Thanks for your reply..It posted couple days without reply, I think maybe nobody interestd. Yes, I would add commit to the end of scripts to make it finished.. I posted this...
7
by: Ugrasena via DBMonster.com | last post by:
Hi team i am using DB2 7.2 on Windows2000. We have lot many SQL Procedure Calls, is there any way i can Turn off the Auto Commit on that Database, the Problem i have is many of our Application...
4
by: DB2 Novice | last post by:
Hello, Is there a way to specify 10,000 rows to commit for DB2 Load? Or is it not applicable here? DB2 Novice
7
by: fyi85 | last post by:
I have 8.1.5 on Windows 2003, when I do from CLP with auto commit off: db2 update table set column=something and then db2 terminate and then db2 connect to db db2 select updated column from...
1
by: jefftyzzer | last post by:
Friends: I've written a stored procedure that, among other things, writes several million rows to a declared global temporary table (DGTT) declared as NOT LOGGED using a (cursor) FOR loop. My...
5
by: Ravi Chirawala | last post by:
Is Two phase commit allowed in DB2? We need to update a local tables and few federated tables in a single Unit of Work. Is it possible to do ? Regards, Ravi
9
by: Anurag | last post by:
ENVIRONMENT: ============ (1) AIX 5.2 ML 8 and AIX 5.3 TL 4. (2) DB2 ESE on some servers and DB2 Connect Enterprise Edition on others. QUESTION: ========= I upgrade DB2 on some 15 Production...
1
by: dbuser | last post by:
Hi I am new to Db2. I am planning to load around 5 million Data using DB2 LOAD utility. Do this utility have an inbuilt COMMIT statement so that i do not get any table locks/deadlock error. ...
7
by: m.gelosa | last post by:
Dear all, I got a problem on db2 for aix running a high workload messaging system with more than 5,000,000 of deliveries per day. During high peak hours it happens frequently that the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.