HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide
You must design the following items as the data import procedure:
The provided import methods are the transaction-based import method and the table-based import method. For details about these import methods, see 3.3.3 Import methods.
You use the startmode or breakmode operand in the import environment definition to specify the import processing method.
The transaction-based import method imports update information into the target HiRDB database in the order the transactions were updated in the source database. If import of update information is into a table with the same format (same table name, column names, and attributes), you can omit the import definition when you use the transaction-based import method.
This method creates an import group for one or more tables subject to import processing and imports data for one group at a time. You can define a maximum of 128 import groups per round of import processing. You use the import group definition to specify import groups. For details about the import group definition, see 5.10.6 Import group definition.
The table-based import method is broken down into the following types:
The table-based partitioning method classifies the transactions updated in the source database into user-defined target groups, and then imports them in parallel.
If you use the table-based partitioning method for import processing and there is a referential constraint among tables, group together those tables that have the referential constraint.
The key range-based partitioning method imports the transactions updated in the source database in parallel on the basis of user-defined key ranges. Note the following when you use the key range-based partitioning method to perform import processing:
The hash partitioning method uses the hash method to import the transactions updated in the source database in parallel.
If the target HiRDB uses the multi-FES facility, the target Datareplicator can execute import processing supporting the multi-FES facility. To use the multi-FES facility, you must specify in the import definition the target front-end servers that correspond to the import groups. The target Datareplicator establishes the correspondence to an SQL process for each target front-end server according to the import definition. This enables you to issue SQL statements in parallel for the various target front-end servers, thereby distributing the workload among the front-end servers.
The following provides an example of using the multi-FES facility for each partitioning type under the table-based import method and discusses considerations concerning use of the multi-FES facility.
If tables are grouped by server at the target HiRDB, using the table-based partitioning method enables you to issue the SQL statements in parallel for the various target front-end servers. You can expect more of an improvement in throughput than with the other methods. The following figure provides an example of using the multi-FES facility with the table-based partitioning method.
Figure 4-40 Example of using the multi-FES facility with the table-based partitioning method
If a table is stored in different servers by row-partitioning key ranges at the target HiRDB, using the key range-based partitioning method enables you to issue the SQL statements in parallel for the various target front-end servers. You can expect an improvement in throughput. The following figure provides an example of using the multi-FES facility with the key range-based partitioning method.
Figure 4-41 Example of using the multi-FES facility with the key range-based partitioning method
If a table is partitioned at the target HiRDB, using the hash partitioning method enables you to execute the SQL statements in parallel for the various front-end servers in accordance with the hash method. Compared to the key range-based partitioning method, this method can execute the processing faster for each front-end server for the multi-FES facility. The following figure provides an example of using the multi-FES facility with the hash partitioning method.
Figure 4-42 Example of using the multi-FES facility with the hash partitioning method
If you employ a multi-FES configuration, the hash partitioning method enables you to set the front-end server to be used to process import data for each partition. This helps to distribute the workload among the front-end servers, and if the front-end server and the back-end server containing the RDAREA are on the same server, it can also reduce the overhead of communication between the front-end server and back-end server.
In the case of a multi-FES environment at the target HiRDB where a target front-end server specified in the import definition and the back-end server that actually executes the import processing are located on different machines, effective processing cannot be executed because of the communication that is required between the front-end server and the back-end server each time import processing occurs. Therefore, if you specify a front-end server in the import definition, specify one that is located on the machine containing the table data.
You must design the interval at which Datareplicator is to issue DISCONNECT requests to the target HiRDB after it detects the end of the update information in the import information queue file. You use the disconnect operand in the import system definition to specify the DISCONNECT-issuance interval for import processing.
Consider the following points in specifying the DISCONNECT- issuance interval:
You can use the event facility to implement import operations on the basis of events at the source system. To use the event facility, you define event codes to correspond to actual events that are issued at the source system, and you specify these event codes in the source Datareplicator's import environment definition. The following discusses the import operations that can be implemented by the event facility.
The following table shows the import operations that can be implemented by the event facility and their relationship to the import environment definition.
Table 4-42 Import operations that can be implemented and their relationship to the import environment definition
| Type of event | Import operation | Operand to be specified |
|---|---|---|
| Import processing stop event | Stops import processing. | eventspd |
| Transaction-based import event | Switches the import method to the transaction-based import method during import processing. | eventtrn |
| Table-based import event | Switches the import method to the table-based import method during import processing. | eventtbl |
| Transaction-based import restart event | Restarts import processing using the transaction-based import method while import processing is stopped. | eventretrn |
| Table-based import restart event | Restarts import processing using the table-based import method while import processing is stopped. | eventretbl |
| Event to reset the import processing count | Resets the target Datareplicator's import processing count. | eventcntreset |
The interval for issuing COMMITs is specified in terms of a number of transactions at the source system. You use the cmtintvl, trncmtintvl, or tblcmtintvl operand in the import environment definition to specify this interval for issuing COMMITs to the target HiRDB.
Consider the following points in specifying the COMMIT-issuance interval:
In the case of update information that is not defined in the import definition, you can design Datareplicator to assume the corresponding source system's extraction definition as the import definition and execute import processing. You use the defmerge operand in the import environment definition to specify the handling of update information that is not defined in the import definition.
Note the following point about specifying the handling of update information that is not defined in the import definition:
You can design the source Datareplicator so that whenever it starts it checks the target HiRDB for tables subject to import processing. You use the tblcheck operand in the import environment definition to specify checking for tables subject to import processing.
When the target Datareplicator starts, it allocates a space in shared memory for storing definition information. You use the defshmsize operand in the import environment definition to specify the size of the shared memory to be used for storing definition information.
Consider the following point in determining the size of the shared memory for storing the definition information:
Of the two locked resources described below, use whichever is larger as the estimate for the resources for the target HiRDB. If data linkage is applied to pdload that is executed on the source HiRDB, all instances of this statement are replaced with INSERT statements at the target. This means that locked resources are required for each INSERT statement. Therefore, if a large amount of HiRDB's locked resources are used, the import processing on the target Datareplicator might result in an SQL error due to a shortage of locked resources. If you apply data linkage to pdload, estimate the number of locked resources of the target database to be equal to or greater than the number of insert operations performed by pdload.
For details about estimating the number of locked resources, see the manual HiRDB Version 9 System Definition.
Add the number of data linkage identifier that can be connected to HiRDB concurrently to the pd_max_users operand value in the HiRDB definition. The number of data linkage identifiers that can be connected to HiRDB concurrently for each data linkage identifier defined in the import system definition is as follows:
Add the number of tables that can access HiRDB concurrently in the pd_max_access_tables operand value in the HiRDB definition. The number of tables that can access HiRDB concurrently is the number of load statements specified in the import definition.
All rights reserved. Copyright (C) 2007, 2013, Hitachi, Ltd.