DB2 Server for VM: 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 VM uses VMCRR 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 121. 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
communication function of DB2 Server for VM. The "SYNCPNTMGR" would be
VM/CRR. The "Other Protected Managers" would be the database manager
function of DB2 Server for VM.
Figure 121. Successful Two-Phase Commit
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.
In the VM environment, DB2 Server for VM uses VM/ESA Coordinated Resource
Recovery (VMCRR) as its sync point manager. VMCRR uses the Callable
Services Library (CSL) routines to customize the sync point manager
function. The environment can be shown as follows:
Figure 122. DB2 Server for VM Distributed Unit of Work Environment.
This diagram shows how a workstation application might use DDCS for OS2
V2.3.1 to execute a distributed unit of work between 2 DB2
Server for VM servers on different VM/ESA systems. Notice that DDCS
registers itself with its own sync point manager. DDCS then establishes
protected conversations with DB2 Server for VM servers 1 and 2. Each
DB2 Server for VM server uses the CRR Recovery server installed on its VM
system to perform any sync point logging and resynchronization
activity. Notice also that each DB2 Server for VM server registers
itself with the CRR Recovery server on its system.
- CAE
- DB2 Client Application Enabler
- DDCS
- Distributed Database Connection Services (V2.3.1)
- CS/2
- Communication Server for OS/2 (V4)
- OS/2
- OS/2 Warp
- PC
- Protected Conversation
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]