DB2 Server for VSE: System Administration
Distributed unit of work is a coordinated approach
involving two phases. This coordination is done by a sync point
manager. DB2 Server for VSE uses CICS/VSE as its sync point
manager. A sync point manager maintains consistency in changes which
are made to protected resources. The primary functions of a sync point
manager include, but are not limited to, the following:
- Keeping track of and logging LUW state information
- Keeping track of and logging all local protected resource manager (PRM)
names that are involved with a logical unit of work
- Coordinating the COMMIT and ROLLBACK of all local PRMs
- Initiating resynchronization protocols for any logical unit of work that
may be in the in-doubt state because of a system or communications
failure.
A sync point manager is required wherever resources may be updated.
This requires that sync point managers at each distributed location
communicate with one another using architected protocols. These
protocols are fully discussed in the SNA LU 6.2 Reference:
Peer Protocols manual.
For a full explanation of what two-phase commit is, see the following
manuals:
- IBM Systems Network Architecture, Format and Protocol Reference
Reference Manual: Architecture Logic for LU Type 6.2
- IBM Systems Network Architecture, Logical Unit 6.2
Reference: Peer Protocols
- IBM Distributed Relational Database Architecture Reference
- Distributed Data Management (DDM) General Information.
An example of a two-phase commit protocol sequence is shown in Figure 122. SNA LU 6.2 functions provide so many
capabilities that it is impossible to show all the possible sequences.
Notes describing key points in the sequence follow the sequence
diagram.
The following assumptions have been made for the example:
- A conversation has been successfully established between the Source Server
and the target communications manager (TCM) using a protected
conversation.
- No error situation occurs.
For example:
- The "Source Server" could be DDCS Multi-User Gateway
V2.3.1. In this case, the "SYNCPNTMGR" would be function
included with DDCS. Also, the "SNA LU 6.2" function could be
provided by Communications Server for OS/2 Version 4.
- The "Target Server" would be DB2 Server for VSE. The "TCM" is the
AXE transaction. The "SYNCPNTMGR" would be CICS/VSE. The "Other
Protected Managers" would be the database manager function of DB2 Server for
VSE.
Figure 122. Successful Two-Phase Commit
![arip2stc](arip2stc.GIF)
Figure Notes:
- (1)
- The Target Communications Manager (TCM) issues a RECEIVE_AND_WAIT APPC
verb to receive the next SQL Request from the Source Server.
- (2)
- The source application program requests the SYNCPNTMGR to commit the
logical unit of work (LUW). The source SYNCPNTMGR notifies the SNA LU
6.2 communications facilities to prepare to commit and notifies the
source database (and other protected resource managers registered with the
SYNCPNTMGR) to prepare to commit. The source communications facility
sends the SNA LU 6.2 prepare message to the target system. The
local protected resource managers respond to the source SYNCPNTMGR with the
"Request Commit" message.
- (3)
- On the target system, the RECEIVE_AND_WAIT verb is completed and the
WHAT_RECEIVED parameter is set to TAKE_SYNCPT.
The TCM issues a SYNCPT verb to the target SYNCPNTMGR which begins the
commit processing. The SYNCPNTMGR prepares the protected resources to
commit.
- (4)
- The SYNCPNTMGR sends the SNA LU 6.2 request commit message to the
source system.
- (5)
- The source SYNCPNTMGR collects the request commit messages from the SNA LU
6.2 communications facilities and the other protected resource
managers. The source SYNCPNTMGR then commits the logical unit of work
by requesting that all of the resources commit. This causes an SNA LU
6.2 committed message to be sent to the target system.
- (6)
- The target SYNCPNTMGR requests that the local resources commit the logical
unit of work and causes an SNA LU 6.2 forget message to be sent to the
source system. In addition, the target SYNCPNTMGR posts a positive
response to the TCM for the SYNCPT verb issued in note (3).
- (7)
- When the source SYNCPNTMGR receives the "FO" responses from the protected
resource managers, a positive response to the commit is given to the
application program.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]