Verifying that two-phase commit (2PC) is enabled on DB2®/390

Technote (FAQ)
Problem
If you have problems with 2PC on a WebSphereŽ Application Server Web application using DB2/390, try these troubleshooting techniques. They help you verify that DB2 2PC is enabled and eliminate DB2 as a potential cause of the problem.
Solution

Execute the following commands from the DB2 command prompt where db 1 or db 2 is the host database that you are having problems performing two phase commit transactions against from your application:
  1. db2set -g DB2OPTIONS=+c

  2. db2stop

  3. db2start

  4. db2 set client connect 2 syncpoint twophase

  5. db2 connect to db 1 user userid using password

  6. Perform some sort of update; for example db2 insert into tab 1...

  7. db2 connect to db 2 user userid using password

  8. Perform some sort of update; for example db2 insert into tab 2...

  9. db2 commit

  10. If the db2 commit command returns without errors, the test completed successfully.
Cross Reference information
SegmentProductComponentPlatformVersionEdition
Data & Information ManagementDB2 for OS/390











Document Information

Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, Java 2 Connectivity (J2C)
Operating system(s): AIX, HPUX, Linux, Multi-Platform, Solaris, Windows
Software version: 3.5, 4.0, 5.0, 5.1, 6.0
Software edition: Edition Independent
Reference #: 1052995
IBM Group: Software Group
Modified date: 2004-05-27