The import transaction synchronization facility is achieved by using the event issuing facility. The following figure shows the flow of processing.
Figure 3-45 Flow of processing by the import transaction synchronization facility
![[Figure]](FIGURE/RZ03S460.GIF)
- #1
- The UAP executes in the following sequence:
- Transaction A
- Transaction B
- hdeevent command
- Transaction C
- The hdeevent command specifies as the event code the number of the synchronous event that has been specified in the eventsync operand in the transmission environment definition.
- #2
- Importing of the update information for BES1, BES2, and BES3 is executed by different import processes. Therefore, importing of transactions A and B is executed asynchronously. When importing of transactions A and B is executed, COMMIT has not been issued yet.
- #3
- The import process waits for another import process when it has imported the synchronous event. When all import processes at BES1 through BES3 have imported all synchronous events and data integrity has been achieved at all back-end servers (after all global transactions are completed), all import processes issue COMMIT at the same time. Therefore, COMMIT for transaction C is not issued until the next synchronous event is executed.
- Note
- When this facility is used, only a synchronous event triggers committing of a transaction that is generated from the target Datareplicator (import transaction). Therefore, unless a synchronous event is issued periodically, the import transaction becomes large and a shortage of HiRDB resources might occur. You must take into account the resources of the target HiRDB and execute a synchronous event periodically so that an import transaction does not result in an error.
A sample shell script for issuing a synchronous event periodically is shown below. This sample issues a synchronous event at an interval of five seconds.
#!/bin/sh
if [ -z "$1" ]
then
echo "Please specify syncevent number."
exit 0
fi
if [ $1 -le 0 -o $1 -ge 129 ]
then
echo "Please specify numerical value from 1 to 128. "
exit 0
fi
if [ -z $PDUSER ]
then
echo "Please set PDUSER."
exit 0
fi
echo "Start event of synchronization."
execf=OK
while [ -n $execf ]
do
/opt/hirdbds/bin/hdeevent -n $1
if [ $? = 0 ]
then
echo "event $1 O.K"
else
echo "Execution of hdeevent failed."
exit 0
fi
sleep 5
done
echo "Stop event of synchronization."
exit 1
|
All rights reserved. Copyright (C) 2007, 2013, Hitachi, Ltd.