Overview of Resynchronization [ ALLBASE/Replicate User's Guide ] MPE/iX 5.0 Documentation
ALLBASE/Replicate User's Guide
Overview of Resynchronization
The transfer and duplication activities that bring about replication are
together referred to as resynchronization and may be carried out
continuously or periodically, depending on the needs of your specific
implementation. There are two kinds of resynchronization: soft
resynchronization and hard resynchronization.
Hard Resynchronization
Hard resynchronization is the process of transferring to the slave
DBEnvironment a consistent, complete image of the master partitions being
replicated. The entire image is transferred at one time, instead of
transaction by transaction as is the case with soft resynchronization.
Hard resynchronization is used in these three sets of circumstances:
* Before starting a slave DBEnvironment, to load the slave with an
image that is consistent with the master.
* After soft resynchronization has failed, to restore a
consistent image to a slave DBEnvironment. This enables soft
resynchronization to be resumed without the loss of any committed
transactions.
* After a master has failed, to restore a consistent image from a
slave to a master DBEnvironment.
Hard resynchronization is discussed further in chapter 4, "Hard
Resynchronization," and chapter 5, "Hints and Suggestions."
Soft Resynchronization
Soft resynchronization is the process carried out by the
ALLBASE/Replicate applications supplied with the product, which run on
the master and the slave. (REPMAST runs on the master while REPSLAVE
runs on the slave.)
Under normal circumstances in an ALLBASE/Replicate environment, soft
resynchronization continuously transfers and applies committed
transactions from the master DBEnvironment to the slave DBEnvironment.
With soft resynchronization, the transfers are sequential, one
transaction at a time. This keeps the slave as a near real-time
duplicate of the master. For example, you might use continuous
resynchronization to maintain a "shadow" DBEnvironment that could take
over if the primary DBEnvironment failed.
You have the option of running ALLBASE/Replicate periodically instead of
continuously. For example, you might use periodic resynchronization when
using ALLBASE/Replicate to do nightly backups of a remotely located,
operatorless environment.
Soft resynchronization is discussed further in chapter 3, "Soft
Resynchronization," and chapter 5, "Hints and Suggestions."
An overview of the use of ALLBASE/Replicate for the replication process
using soft resynchronization is shown in Table 1-1 . Many important
details have been omitted and will be covered in more detail in later
chapters of this user guide.
These steps establish a continuously running ALLBASE/Replicate
environment. This environment will continue to transfer completed
transactions from the designated master DBEnvironment partitions to the
slave DBEnvironment and replicate them on the slave until you terminate
the process, or until some error condition occurs. Details of error
recovery are covered in later chapters.
The steps in the table are very general, but they are a good guideline
for each pair of DBEnvironments you want to operate in a master-slave
configuration. More complex configurations may make use of several pairs
of ALLBASE/Replicate DBEnvironments, each operating in a master-slave
relationship.
Table 1-1. Steps for Initiating Soft Resynchronization
-------------------------------------------------------------------------------------------------
| | | | |
| Step No. | MASTER | Step No. | SLAVE |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| 1. | Create the master DBEnvironment, | | |
| | using ISQL START DBE NEW, | | |
| | specifying details needed for | | |
| | operation of ALLBASE/Replicate. | | |
| | | | |
| 2. | Load the master DBEnvironment, | | |
| | create indexes, specify security, | | |
| | and complete all other | | |
| | DBEnvironment creation activities. | | |
| | | | |
| 3. | Start the master DBEnvironment | | |
| | using ISQL START DBE NEWLOG to | | |
| | specify appropriate parameters for | | |
| | ALLBASE/Replicate operation. | | |
| | | | |
| 4. | Add additional log files using the | | |
| | SQLUtil ADDLOG command. (You need | | |
| | at least two log files.) | | |
| | | | |
| 5. | Verify the DBEnvironment startup | | |
| | parameters using the SQLUtil | | |
| | SHOWDBE ALL command. | | |
| | | | |
| 6. | Backup the DBEnvironment using the | | |
| | SQLUtil STORE or STOREONLINE | | |
| | commands. | | |
| | | | |
| 7. | Make preparations on the master | | |
| | for creation of the slave. | | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| | | 8. | Create the slave DBEnvironment, |
| | | | using ISQL START DBE NEW, specify |
| | | | details needed for operation of |
| | | | ALLBASE/Replicate. (You could |
| | | | also duplicate the master |
| | | | DBEnvironment using SQLUtil STORE |
| | | | and RESTORE, and then omit step |
| | | | 9.) |
| | | | |
| | | 9. | Load the slave DBEnvironment, |
| | | | create indexes, specify security, |
| | | | and complete all other |
| | | | DBEnvironment creation activities. |
| | | | |
| | | 10. | Start the slave DBEnvironment |
| | | | using ISQL START DBE NEWLOG to |
| | | | specify appropriate parameters for |
| | | | ALLBASE/Replicate operation. |
| | | | |
| | | 11. | Add additional log files using the |
| | | | SQLUtil ADDLOG command. (You need |
| | | | at least two log files.) |
| | | | |
-------------------------------------------------------------------------------------------------
Table 1-1. Steps for Initiating Soft Resynchronization (cont.)
-------------------------------------------------------------------------------------------------
| | | | |
| Step No. | MASTER | Step No. | SLAVE |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| | | 12. | Verify the DBEnvironment startup |
| | | | parameters using the SQLUtil |
| | | | SHOWDBE ALL command. |
| | | | |
| | | 13. | Backup the DBEnvironment using the |
| | | | SQLUtil STORE or STOREONLINE |
| | | | commands. |
| | | | |
| | | 14. | Set Soft Resynchronization Options |
| | | | on the slave. |
| | | | |
| | | 15. | Start the soft resynchronization |
| | | | process on the slave environment |
| | | | by using REPSLAVE (the slave |
| | | | portion of the application |
| | | | supplied with ALLBASE/Replicate.) |
| | | | |
| | | 16. | Obtain the node name of the slave |
| | | | for later use when you initiate |
| | | | the soft resynchronization process |
| | | | on the master by executing the |
| | | | command, NMMGR.PUB.SYS. |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| 17. | Set Soft Resynchronization Options | | |
| | on the master. | | |
| | | | |
| 18. | Start the soft resynchronization | | |
| | process on the master environment | | |
| | by executing REPMAST (the master | | |
| | portion of the application | | |
| | supplied with ALLBASE/Replicate.) | | |
| | | | |
| 19. | Test the soft resynchronization | | |
| | process by entering several UPDATE | | |
| | or INSERT statements to the | | |
| | DBEnvironment. Remember to COMMIT | | |
| | WORK. Transactions are not | | |
| | replicated until committed. | | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| | | 20. | Verify that the changes made to |
| | | | the master DBEnvironment are |
| | | | replicated on the slave using |
| | | | appropriate SELECT statements. |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| 21. | Remove the test transactions using | | |
| | appropriate UPDATE or DELETE | | |
| | statements unless you want them to | | |
| | be permanent. | | |
| | | | |
-------------------------------------------------------------------------------------------------
| | | | |
| | | 22. | Verify that test transactions were |
| | | | removed from the slave |
| | | | DBEnvironment. |
| | | | |
-------------------------------------------------------------------------------------------------
MPE/iX 5.0 Documentation