If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Implicitly Ending a Transaction

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-14-04, 15:24
jayecarter jayecarter is offline
Registered User
 
Join Date: Aug 2002
Location: St. Louis
Posts: 16
Implicitly Ending a Transaction

The database server and client are both UDB 7.2 fixpack 4 running on Windows 2000 sp 4. Auto commit is turned off within the client application.

The Version 7 Application Development Guide says that on a Windows 32-bit Operating System uncommitted transactions are always rolled back regardless of whether the program terminates in a normal or abnormal fashion. Behavior on "Most" Operating Systems is to commit with a normal termination and rollback with and abnormal termination.

However, our tests show transactions are implicitly committed if the application is closed via the system menu option close or the [X] option on the window. Transactions are also implicitly committed if the application resets the connection.

However, if the application is killed via the task manager or the application issues a terminate command or the application is forced (force application) the transaction is rolled back.

Our druthers would be that without an explicit application commit in flight transactions are rolled back like the documentation specifies.

So is the documentation incorrect or am I missing something? On non Windows 32-bit systems how is this handled in your code?

Thanks,
Jay
Reply With Quote
  #2 (permalink)  
Old 06-14-04, 15:27
Marcus_A Marcus_A is online now
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You didn't explain exactly what DB2 interface your programs are using.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 06-14-04, 15:34
jayecarter jayecarter is offline
Registered User
 
Join Date: Aug 2002
Location: St. Louis
Posts: 16
Marcus,
The application where we've run into this problem is C++ using embedded SQL and CLI. There's a mix of static and dynamic SQL. Also, I can exercise the issue throught the db2 command window.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On